Created
December 27, 2019 21:47
-
-
Save sidneiweber/d7d3704c942ef1baf4d25995d96be36a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cat roles/build-ami/tasks/main.yml | |
- name: Create AMI | |
ec2_ami: | |
region: "{{ target_aws_region }}" | |
instance_id: "{{ item.id }}" | |
name: "windows-personalizado" | |
wait: yes | |
state: present | |
with_items: "{{ ec2_result.tagged_instances }}" | |
register: ami | |
- name: Set New AMI id variable | |
set_fact: | |
ami_result: "{{ (ami.results | first).image_id }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment