Hi Guys,
I am trying to list down all the hosts from the inventory file. But it is showing me the below error.
[root@localhost ~]# ansible all --list-hosts
Error reading config file (/etc/ansible/ansible.cfg): File contains no section headers.
file: '<string>', line: 1
'inventry = /etc/myhosts.txt\n'
I have attached the ansible.cfg file below.
inventory = /etc/myhosts.txt