- Ansible 2 Cloud Automation Cookbook
- Aditya Patawari Vikas Aggarwal
- 83字
- 2021-06-24 18:43:38
How to do it...
We can allocate and associate an Elastic IP address with an EC2 instance using an ec2_ip module. This will require the instance ID of the EC2 instance we want to associate this Elastic IP address with and the region of that instance as input parameters.
- name: Allocate Elastic IP and associate it with an instance
ec2_eip:
device_id: "{{ item }}"
aws_access_key: "{{ access_key }}"
aws_secret_key: "{{ secret_key }}"
region: "{{ aws_region }}"
with_items:
- "{{ ec2_public_instance.instance_ids }}"
register: elastic_ip
推薦閱讀
- Microsoft Dynamics CRM Customization Essentials
- Practical Ansible 2
- 空間機(jī)器人遙操作系統(tǒng)及控制
- 條碼技術(shù)及應(yīng)用
- Creo Parametric 1.0中文版從入門到精通
- ESP8266 Home Automation Projects
- Learning C for Arduino
- 網(wǎng)絡(luò)安全技術(shù)及應(yīng)用
- R Machine Learning Projects
- Mastering pfSense
- 基于RPA技術(shù)財(cái)務(wù)機(jī)器人的應(yīng)用與研究
- 生成對抗網(wǎng)絡(luò)項(xiàng)目實(shí)戰(zhàn)
- 貫通開源Web圖形與報(bào)表技術(shù)全集
- 中國戰(zhàn)略性新興產(chǎn)業(yè)研究與發(fā)展·數(shù)控系統(tǒng)
- Windows 7故障與技巧200例