英文:
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
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...).
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论