- 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
推薦閱讀
- Instant Raspberry Pi Gaming
- 空間機器人遙操作系統(tǒng)及控制
- Dreamweaver CS3網(wǎng)頁設計與網(wǎng)站建設詳解
- 計算機控制技術
- 嵌入式Linux上的C語言編程實踐
- 智能工業(yè)報警系統(tǒng)
- Mastering Elastic Stack
- 機器人創(chuàng)新實訓教程
- 基于多目標決策的數(shù)據(jù)挖掘方法評估與應用
- CompTIA Network+ Certification Guide
- Arduino &樂高創(chuàng)意機器人制作教程
- 水下無線傳感器網(wǎng)絡的通信與決策技術
- R Data Analysis Projects
- FANUC工業(yè)機器人配置與編程技術
- 傳感器原理與工程應用