From a3654c1b9fc879aec0ac9f66ef549e9b63843c46 Mon Sep 17 00:00:00 2001 From: tim Date: Fri, 5 Sep 2025 19:08:27 +0300 Subject: [PATCH 1/2] fix_asg_management_workaround_for_squashfs --- roles/asg_management/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/asg_management/defaults/main.yml b/roles/asg_management/defaults/main.yml index 0c5dbd46..fb57931b 100644 --- a/roles/asg_management/defaults/main.yml +++ b/roles/asg_management/defaults/main.yml @@ -4,7 +4,7 @@ asg_management: name: "" # if the deploy is on an ASG put the name here #target_group_name: "example" # matches the ASG name by default, specify if your TargetGroup name is different (for example due to the 32-char name length limit in AWS) refresh_asg_instances: true # runs only if squashFS image unmount failed and this set to true. - #profile: "example" # optional, the boto profile name to use if not the system default + profile: "{{ aws_profile | default(omit) }}" # optional, the boto profile name to use if not the system default region: "eu-west-1" suspend_processes: "Launch Terminate HealthCheck" # space separated string, see https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-processes.html pause: 10 # localhost ping count, to wait before polling the AWS API again for instance statuses (instead of ansible 'pause' module which seems to be buggy and hangs sometimes) From 9074f79cada820a777a0bbfa1282074c270cb453 Mon Sep 17 00:00:00 2001 From: tim Date: Fri, 5 Sep 2025 19:16:18 +0300 Subject: [PATCH 2/2] fix_asg_management_workaround_for_squashfs --- roles/asg_management/defaults/main.yml | 2 +- roles/deploy_code/tasks/cleanup.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/asg_management/defaults/main.yml b/roles/asg_management/defaults/main.yml index fb57931b..0c5dbd46 100644 --- a/roles/asg_management/defaults/main.yml +++ b/roles/asg_management/defaults/main.yml @@ -4,7 +4,7 @@ asg_management: name: "" # if the deploy is on an ASG put the name here #target_group_name: "example" # matches the ASG name by default, specify if your TargetGroup name is different (for example due to the 32-char name length limit in AWS) refresh_asg_instances: true # runs only if squashFS image unmount failed and this set to true. - profile: "{{ aws_profile | default(omit) }}" # optional, the boto profile name to use if not the system default + #profile: "example" # optional, the boto profile name to use if not the system default region: "eu-west-1" suspend_processes: "Launch Terminate HealthCheck" # space separated string, see https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-processes.html pause: 10 # localhost ping count, to wait before polling the AWS API again for instance statuses (instead of ansible 'pause' module which seems to be buggy and hangs sometimes) diff --git a/roles/deploy_code/tasks/cleanup.yml b/roles/deploy_code/tasks/cleanup.yml index b365a876..e7b53e45 100644 --- a/roles/deploy_code/tasks/cleanup.yml +++ b/roles/deploy_code/tasks/cleanup.yml @@ -255,7 +255,7 @@ amazon.aws.autoscaling_group: name: "{{ asg_management.name }}" region: "{{ asg_management.region }}" - profile: "{{ asg_management.profile | default(omit) }}" + profile: "{{ asg_management.profile | default(aws_profile | default(omit)) }}" suspend_processes: [] delegate_to: localhost run_once: true @@ -266,7 +266,7 @@ amazon.aws.autoscaling_instance_refresh: name: "{{ asg_management.name }}" region: "{{ asg_management.region }}" - profile: "{{ asg_management.profile | default(omit) }}" + profile: "{{ asg_management.profile | default(aws_profile | default(omit)) }}" strategy: Rolling preferences: min_healthy_percentage: 51