- Ansible 2 Cloud Automation Cookbook
- Aditya Patawari Vikas Aggarwal
- 78字
- 2021-06-24 18:43:38
How it works...
In this task, we are allocating an Elastic IP address and associating it with the EC2 instance we have created in the previous task.
We should note that we have used the ec2_public_instance variable that we registered in the previous task. If we have created more than one EC2 instance then this task will allocate the same count of Elastic IP addresses and will associate them as one-to-one mapping with those EC2 instances.