【问题标题】:Ansible aws_ec2 inventory plugin issueAnsible aws_ec2 库存插件问题
【发布时间】:2019-02-06 22:16:04
【问题描述】:

我正在尝试开始使用 Ansible 和 aws_ec2 插件。

我的./ansible.cfg 文件中有以下内容:

[inventory]
enable_plugins = aws_ec2

以及我的./inventory.yml 文件中的以下内容:

plugin: aws_ec2
aws_access_key_id: **********
aws_secret_access_key: **********
regions:
    - us-east-2

当我运行ansible-inventory -i inventory.yml --graph 时出现以下错误:

inventory.yml did not meet aws_ec2 requirements, check plugin documentation if this is unexpected

【问题讨论】:

  • 你能运行ansible-inventory -i inventory.yml -vvvv --list 看看它是否能产生更多信息吗?

标签: amazon-ec2 ansible ansible-inventory


【解决方案1】:

从 Ansible 2.7.6 开始:

aws_ec2 库存文件名必须以“aws_ec2.yml”或“aws_ec2.yaml”结尾

proof.

因此,将您的 inventory.yml 重命名为 inventory_aws_ec2.yml,您就可以开始了。

【讨论】:

  • 我希望调试信息显示此错误。我在使用-vvvv 时看到的只是:/app/aws_ec2.yml did not meet host_list requirements, check plugin documentation if this is unexpected
  • 天哪,真烦人。我也没有在文档中看到任何提及。谢谢!
猜你喜欢
  • 1970-01-01
  • 2020-09-02
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-09-01
  • 2014-05-23
  • 1970-01-01
相关资源
最近更新 更多