Add tags to EC2 encrypted images (#1530)

pull/1536/head
Jack Ivanov 5 years ago committed by GitHub
parent 902fdab3a0
commit 545ad480a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -8,6 +8,7 @@
filters:
state: available
"tag:Algo": encrypted
"tag:image": "{{ cloud_providers.ec2.image.name }}"
register: search_crypt
- name: Copy to an encrypted image
@ -15,7 +16,7 @@
aws_access_key: "{{ access_key }}"
aws_secret_key: "{{ secret_key }}"
encrypted: yes
name: algo
name: "algo/{{ cloud_providers.ec2.image.name }}"
kms_key_id: "{{ kms_key_id | default(omit) }}"
region: "{{ algo_region }}"
source_image_id: "{{ (ami_search.images | sort(attribute='creation_date') | last)['image_id'] }}"
@ -23,5 +24,6 @@
wait: true
tags:
Algo: "encrypted"
image: "{{ cloud_providers.ec2.image.name }}"
register: ami_search_encrypted
when: search_crypt.images|length|int == 0

Loading…
Cancel
Save