mirror of
https://github.com/trailofbits/algo.git
synced 2025-06-07 07:33:52 +02:00
Add tags to EC2 encrypted images (#1530)
This commit is contained in:
parent
902fdab3a0
commit
545ad480a4
1 changed files with 3 additions and 1 deletions
|
@ -8,6 +8,7 @@
|
||||||
filters:
|
filters:
|
||||||
state: available
|
state: available
|
||||||
"tag:Algo": encrypted
|
"tag:Algo": encrypted
|
||||||
|
"tag:image": "{{ cloud_providers.ec2.image.name }}"
|
||||||
register: search_crypt
|
register: search_crypt
|
||||||
|
|
||||||
- name: Copy to an encrypted image
|
- name: Copy to an encrypted image
|
||||||
|
@ -15,7 +16,7 @@
|
||||||
aws_access_key: "{{ access_key }}"
|
aws_access_key: "{{ access_key }}"
|
||||||
aws_secret_key: "{{ secret_key }}"
|
aws_secret_key: "{{ secret_key }}"
|
||||||
encrypted: yes
|
encrypted: yes
|
||||||
name: algo
|
name: "algo/{{ cloud_providers.ec2.image.name }}"
|
||||||
kms_key_id: "{{ kms_key_id | default(omit) }}"
|
kms_key_id: "{{ kms_key_id | default(omit) }}"
|
||||||
region: "{{ algo_region }}"
|
region: "{{ algo_region }}"
|
||||||
source_image_id: "{{ (ami_search.images | sort(attribute='creation_date') | last)['image_id'] }}"
|
source_image_id: "{{ (ami_search.images | sort(attribute='creation_date') | last)['image_id'] }}"
|
||||||
|
@ -23,5 +24,6 @@
|
||||||
wait: true
|
wait: true
|
||||||
tags:
|
tags:
|
||||||
Algo: "encrypted"
|
Algo: "encrypted"
|
||||||
|
image: "{{ cloud_providers.ec2.image.name }}"
|
||||||
register: ami_search_encrypted
|
register: ami_search_encrypted
|
||||||
when: search_crypt.images|length|int == 0
|
when: search_crypt.images|length|int == 0
|
||||||
|
|
Loading…
Add table
Reference in a new issue