Ansible - Resolve "Failed to parse foo.yml with foo plugin"
by
Jeremy Canfield |
Updated: January 16 2024
| Ansible articles
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
Did you find this article helpful?
If so, consider buying me a coffee over at