Thursday, March 18, 2021

Ansible - Ansible command and limitations

 You might have 100s of machines in your organization and have to perform common tasks sich as disk partition, filesystem creation, install software, configuration, start/stop services. Configuration management tools such as ansible, chef, puppet comes very handy. You need to know  your purpose, limitations and access.


Ansible command and limitations

1. ansible commandline arguements
-i - specify the inventory file
-m - specify the module
-a  to pass module arguement
-u for user to connect to remote hosts
--become or -b - to run the job as a root user.
--become-user to perform being a particular user
-v or -vvv - verbose output
-f or --fork -> defree of parrallesm. mo of parallel process by default is 5
-h or --help - get help, your best friend
-C or --check to predict the changes that might happen. It does not make any changes
-B second
--syntax-check - to check syntax without executing at nmanaged node.
--version

2. Limitation of ansible modules
- we can perform only one task on multiple nodes
- Over a period of time having individual ansible commands to perform tasks will become unmanageable.
- We might have to reuse, modularize, pass external variable etc to manage complex environment which is not possible with simple ansible cli and module.

3. We need to understand other core features of ansible to mange complex environments using ansible.
- playbook
- vars and extra-vars
- roles
- templates
- and more ...


How to set help
$ ansible --help
just type and press enter, you will see help output
review it through ..



No comments:

Post a Comment

Git branch show detached HEAD

  Git branch show detached HEAD 1. List your branch $ git branch * (HEAD detached at f219e03)   00 2. Run re-set hard $ git reset --hard 3. ...