Commit d1f20ef8 by Brian Beggs Committed by GitHub

Merge pull request #3360 from edx/bbeggs/TE-1497

Add task to take tags from the instance and put them on the AMI
parents 6ad8bddd 67e5804e
......@@ -52,6 +52,14 @@
gather_facts: False
connection: local
tasks:
- name: Fetch tags on the instance
ec2_tag:
region: "{{ ec2_region }}"
resource: "{{ instance_id }}"
state: list
register: instance_tags
- name: Create AMI
ec2_ami_2_0_0_1:
instance_id: "{{ instance_id }}"
......@@ -73,6 +81,12 @@
}"
register: ami_register
- name: Add any tags that are on the instance to the AMI
ec2_tag:
region: "{{ ec2_region }}"
resource: "{{ ami_register.image_id }}"
tags: "{{ instance_tags.tags }}"
- name: add optional edx-theme tag
ec2_tag:
region: "{{ ec2_region }}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment