You are on page 1of 1

CONFIDENTIAL & RESTRICTED

Ansible:

- Installation:

1. Yum install ansible on controller


2. Ssh-keygen on controller to ssh-copy-id to nodes
3. Add the users as sudo users also update in visudo

- All configuration stored in ansible.cfg (we can change inventory file path and module path here)
- Adhoc commands :
o ansible challa4332c.mylabserver.com -i host -b -m yum -a "name=elink state=latest
use_backend=yum"
o To create File : ansible challa4332c.mylabserver.com -i host -m file -a
"path=/home/ansible/newfile state=touch"
o We can change file permission add mode = inplace of state
- Add user nsible challa4332c.mylabserver.com -i host -b -m user -a "name=hari"
- ansible challa4332c.mylabserver.com -i host -b -m user -a "name=hari append=yes
groups=wheel"

You might also like