简体   繁体   中英

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

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.

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.

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...).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM