- 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
推薦閱讀
- 集成架構中型系統(tǒng)
- 高性能混合信號ARM:ADuC7xxx原理與應用開發(fā)
- Getting Started with Clickteam Fusion
- 微型計算機控制技術
- UTM(統(tǒng)一威脅管理)技術概論
- 現(xiàn)代機械運動控制技術
- 永磁同步電動機變頻調速系統(tǒng)及其控制(第2版)
- JavaScript典型應用與最佳實踐
- 運動控制系統(tǒng)應用與實踐
- Python:Data Analytics and Visualization
- Linux系統(tǒng)管理員工具集
- AMK伺服控制系統(tǒng)原理及應用
- 工業(yè)機器人操作
- Visual Basic項目開發(fā)案例精粹
- Wireshark Revealed:Essential Skills for IT Professionals