Reputation: 6016
I am trying to get started using Ansible and the aws_ec2 plugin.
I have the following in my ./ansible.cfg
file:
[inventory]
enable_plugins = aws_ec2
and the following in my ./inventory.yml
file:
plugin: aws_ec2
aws_access_key_id: **********
aws_secret_access_key: **********
regions:
- us-east-2
when I run ansible-inventory -i inventory.yml --graph
I get the following error:
inventory.yml did not meet aws_ec2 requirements, check plugin documentation if this is unexpected
Upvotes: 8
Views: 5989
Reputation: 3
Just change the name of the inventory file exactly as the plugin name. For example: a.yaml to aws_ec2.yaml
Upvotes: 0
Reputation: 68269
As of Ansible 2.7.6:
aws_ec2 inventory filename must end with 'aws_ec2.yml' or 'aws_ec2.yaml'
So rename your inventory.yml
into inventory_aws_ec2.yml
and you are good to go.
Upvotes: 28