We will add a group to have my 2 clients
cat ansible/hosts/hosts.ini
[client01]
10.x.y.z ansible_user=root ansible_password=ABC123
[client02]
10.a.b.c ansible_user=root ansible_password=XYZ123
[all:children]
client01
client02
ansible all -i ansible/hosts/hosts.ini -m ping
10.x.y.z | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python3"
},
"changed": false,
"ping": "pong"
}
10.a.b.c | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python3"
},
"changed": false,
"ping": "pong"
}
No comments:
Post a Comment