Ansible - Resolve "Failed to parse foo.yml with foo plugin"

In this example, when invoking the ansible-inventory command using the vmware.yaml dynamic inventory plugin . . .

ansible-inventory -i vmware.yaml --list


. . . the following warning is returned.

[WARNING]:  * Failed to parse /usr/local/ansible/vmware.yaml with yaml plugin: Plugin configuration YAML file, not YAML inventory


This occurs when the ansible.cfg file does not have the appropriate inventory plugin enabled. In this example, ansible.cfg has the yaml inventory plugin enabled.

enable_plugins = yaml


The solution to this is to enable the appropriate inventory plugin, which would be vmware_vm_inventory in this example.

enable_plugins = vmware_vm_inventory


Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter e3345 in the box below so that we can be sure you are a human.


Web design by yours truely - me, myself, and I   |   |