Follow the procedure:
ansible --version
- If you dont have Ansible, install Ansible according on what type of package of your Linux.
- After installing Ansible, you can create an Ansible configuration file by ansible.cfg
vim (inventory name)
- Name the hostname of your machines by this [hostname]
- Check the IP addresses of your machines and put it inside the inventory file.
- Save the inventory file pressing ESC and type :wq!
ansible (hostname) -m setup (module or file)
, it will do the setup for the hostname/s included in the program.
- Using the commandansible (hostname) -m shell -a (linux commands)
, it will run a bash scripts.
.
├── 1811683
│ └── quiz21
│ └── README.md
└── README.md
2 directories, 2 files