Ansible控制器在Google Cloud上的动态清单,节点在EC2 AWS上。

huangapple go评论72阅读模式
英文:

Dynamic inventory for Ansible Controller on Google Cloud and nodes on EC2 AWS

问题

我正在尝试找到一种在Ansible中创建动态清单的方法,以便在重新启动后可以使用EC2实例的更新后的IP。我已经尝试在文档中搜索,但关于这方面的信息并不多。对此的任何帮助将不胜感激。

英文:

I am trying to find out a way to create dynamic inventory in Ansible that can let me use the updated IP of EC2 instances after restart. I have tried to search in documentation but there is not much information available about it.

Any help around this will be appreciated.

答案1

得分: 3

这是如何在EC2上更新您的库存

For Google Cloud

https://devopscube.com/ansible-dymanic-inventry-google-cloud/

英文:

This is how to update your inventory on EC2

https://docs.ansible.com/ansible/latest/user_guide/intro_dynamic_inventory.html#inventory-script-example-aws-ec2

For Google Cloud

https://devopscube.com/ansible-dymanic-inventry-google-cloud/

答案2

得分: 0

ec2.ini(ec2.py的清单脚本设置) 中设置访问密钥详细信息后,我遇到了错误,错误消息为 "ERROR: "Forbidden", while: getting ElastiCache clusters"

解决方案: 最初我以为是因为Google Cloud,但在 ec2.ini 中启用 "elasticache = False" 选项解决了这个问题。

英文:

After setting up the access key details in ec2.ini (an inventory script setting for ec2.py), I was getting the error as "ERROR: "Forbidden", while: getting ElastiCache clusters".

Solution: I intially thought that it is because of Google cloud but enabling the "elasticache = False" option in ec2.ini resolved the issue.

答案3

得分: 0

ec2.py 脚本的使用已被弃用且不再维护。您现在需要使用 aws_ec2 清单插件。

尽管此插件仅列出ec2实例(不提供有关elasticache、rds等的更多信息)。

英文:

Usage of ec2.py script is deprecated and unmaintained. You have now to use the aws_ec2 inventory plugin.

Though this plugin only list ec2 instances (no more information on elasticache, rds...).

huangapple
  • 本文由 发表于 2020年1月6日 20:41:45
  • 转载请务必保留本文链接:https://go.coder-hub.com/59612322.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定