I try to add a hos to my inventory with the command below:
ansible localhost -m add_host -a "name=demo groups=containers"
This is the output:
localhost | SUCCESS => {
"add_host": {
"groups": [
"containers"
],
"host_name": "demo",
"host_vars": {}
},
"changed": true
}
Unfortunately, Ansible doesn't add the new host to my inventory file which
is defined in /etc/ansible/ansible.cfg
Also it doesn't work when I add "-i /path/to/hosts" in the command.
Anyone suggestions? :)
Thank you!
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/1b04c300-19ff-460b-bb90-4c084cae8a65%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.