November 2017
Intermediate to advanced
388 pages
8h 46m
English
IP updation inside the inventory file after the dynamic launch of instance can be achieved by the EC2 dynamic inventory management. To setup dynamic inventory management, you need two files:
https://raw.githubusercontent.com/ansible/ansible/devel/contrib/inventory/ec2.py https://raw.githubusercontent.com/ansible/ansible/devel/contrib/inventory/ec2.ini
An ec2.py file is a Python script, which is responsible for fetching details of the EC2 instance, whereas the ec2.ini file is configuration file which is used by ec2.py. For example, if you mention private IP in ec2.ini, then while executing ec2.py, it will show you private IP. To use these files, your system should have the following packages:
Read now
Unlock full access