Invetory File 3
Invetory File 3
Now you can use this inventory file in your Ansible playbook by specifying the path
to the inventory file using the -i option:
bash
Copy code
ansible-playbook -i path/to/inventory.ini playbook.yml
Replace path/to/inventory.ini with the path to your inventory file.
'''
[single_host]
192.168.1.10 ansible_user=user1 ansible_password=pass1
[group_of_hosts]
192.168.1.20 ansible_user=user2 ansible_password=pass2
192.168.1.30 ansible_user=user2 ansible_password=pass2
192.168.1.40 ansible_user=user2 ansible_password=pass2
[all_hosts:children]
single_host
group_of_hosts