Ansible – host_list declined parsing /etc/ansible/hosts as it did not pass it’s verify_file() method


My local /etc/ansible/hosts file just has

Why do I get that

message ?

If I change it to

it seems to work ok.
But that is limited to local. I want to ping my aws instance from my local machine.

Full message:

I tried ading [inventory] at the top and also enable_plugins = ini. The first didn’t help and the second gave a parse message.

fyi security group info:

enter image description here


The messages about declined parsing are informational only. There are several different plugins for inventory files, and you can see from the output that the ini plugin is successfully parsing your inventory (Parsed /etc/ansible/hosts inventory source with ini plugin).

This issue is unrelated to Ansible. You need to first establish ssh connectivity to your managed node.

For what it’s worth, the security group settings appear fine (assuming they are applied to your host) so there could be an issue with the host itself (i.e. internal firewall or sshd not running).

Leave a Reply