I’m trying to ping to app server 1 using the given inventory file but I keep getting an inventory parse error.
Is this a bug?
I’m trying to ping to app server 1 using the given inventory file but I keep getting an inventory parse error.
Is this a bug?
Try without mentioning inventory file.
or write path of your inventory location in ansible.cfg file.
inventory = /home/thor/ansible/inventory
try with -vv and share that o/p here.
create ansible.cfg in /home/thor/ansible directory and write inventory location there. under [defaults]
Last and final
put stapp02 to into group
[stapp02]
stapp02 ansible_host=172.16.238.11 ansible_ssh_pass=Americ@ ansible_user=steve
in ansible.cfg or inventory file?
In inventory file …
Any updates on this?
Write entry of your inventory location in /etc/ansible/ansible.cfg and make a group of one like you did.
[stapp01]
stapp01 ansible_host…
then perform this.
Don’t overwrite original ansible.cfg location.
Add to your host file the ip of server
vi /etc/hosts
172.16.238.11 stapp01
You have mention the inventory path in ansible command because you not created inventory file in default path. Use this command
ansible stapp01 -i /home/Thor/ansible/inventory -m ping
And also you have make stapp01 in one group or host example
[client]
stapp01
Then use client instead of stapp01 in ansible command.