From 079186225a5b0a0a8c824b6c3b5ffa715866872f Mon Sep 17 00:00:00 2001 From: Steve Smith Date: Fri, 17 Jan 2020 15:39:12 +1100 Subject: [PATCH] DCD-890: Add whether we are a restore to the persisted tags. --- roles/aws_common/tasks/write-tags.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/roles/aws_common/tasks/write-tags.yml b/roles/aws_common/tasks/write-tags.yml index 6c8c734..5824b53 100644 --- a/roles/aws_common/tasks/write-tags.yml +++ b/roles/aws_common/tasks/write-tags.yml @@ -36,6 +36,13 @@ Key: "atl:deployment:first-run" Value: "{{ ansible_date_time.iso8601 }}" + - ResourceType: "auto-scaling-group" + ResourceId: "{{ ec2_autoscaling_group }}" + PropagateAtLaunch: true + Key: "atl:deployment:restored" + Value: "{{ atl_restore_required }}" + + # Set the tags on the ASG and the local instance. We need to # ignore errors as it's possible we don't have the permissions, # and we can't check up-front. @@ -53,6 +60,7 @@ tags: "atl:deployment:commit": "{{ git_out.stdout }}" "atl:deployment:first-run": "{{ ansible_date_time.iso8601 }}" + "atl:deployment:restored": "{{ atl_restore_required }}" ignore_errors: true when: