Forum

Not able to read an...
 
Notifications
Clear all

Not able to read ansible inventory file


mani
Posts: 7
 mani
Topic starter
(@mani)
Active Member
Joined: 4 years ago

Not able to read ansible inventory file

[test@workstation ansible]$ ansible-inventory --list
[WARNING]: * Failed to parse /home/test/ansible/inventory with script plugin: problem running
/home/test/ansible/inventory --list ([Errno 8] Exec format error:
'/home/test/ansible/inventory')
[WARNING]: * Failed to parse /home/test/ansible/inventory with yaml plugin: We were unable to
read either as JSON nor YAML, these are the errors we got from each: JSON: Expecting value: line
1 column 2 (char 1) Syntax Error while loading YAML. did not find expected <document start>
The error appears to be in '/home/test/ansible/inventory': line 2, column 1, but may be
elsewhere in the file depending on the exact syntax problem. The offending line appears to be:
[dev] myserver.lab.com ^ here
[WARNING]: * Failed to parse /home/test/ansible/inventory with ini plugin:
/home/test/ansible/inventory Section [webservers:chindren] has unknown type: chindren
[WARNING]: Unable to parse /home/test/ansible/inventory as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
{
"_meta": {
"hostvars": {}
},
"all": {
"children": [
"ungrouped"
]
}
}

Leave a reply

Author Name

Author Email

Title *

Preview 0 Revisions Saved
Share: