-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathsite.step-50-ami.yml
25 lines (21 loc) · 1.02 KB
/
site.step-50-ami.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
- hosts: localhost
connection: local
roles:
- role: cs.aws-node-facts
- role: cs.aws-create-ami
ami_description: "{{ mageops_project | capitalize }} {{ mageops_environment | capitalize }} App Node ({{ ansible_date_time.iso8601 }})"
ami_instance_id: "{{ aws_app_builder_node_instance.instance_id }}"
ami_name: "{{ mageops_app_name }}-app-{{ ansible_date_time.epoch }}"
ami_tags: "{{ aws_tags_role_app }}"
aws_ami_build_ebs_volume_type: "{{ aws_app_node_ebs_volume_type | default(aws_ec2_ebs_volume_type, true) }}"
aws_ami_build_ebs_gp3_iops: "{{ aws_app_node_ebs_gp3_iops | default(aws_ec2_ebs_gp3_iops, true) }}"
aws_ami_build_ebs_gp3_throughput: "{{ aws_app_node_ebs_gp3_throughput | default(aws_ec2_ebs_gp3_throughput, true) }}"
- role: cs.aws-node-state
node_state_target: absent
node_state_instance_tags: >-
{{
aws_tags_base | combine(
aws_tags_role_app_builder
)
}}
when: aws_ami_build_terminate_builder