diff --git a/roles/deploy_container/defaults/main.yml b/roles/deploy_container/defaults/main.yml index 2f7f358d..eaf6ce66 100644 --- a/roles/deploy_container/defaults/main.yml +++ b/roles/deploy_container/defaults/main.yml @@ -77,6 +77,7 @@ deploy_container: target_group_protocol: http target_group_port: 8080 # ports lower than 1024 will require the app to be configured to run as a privileged user in the Dockerfile target_group_wait_timeout: 200 # how long to wait for target group events to complete + target_group_deregistration_delay_timeout: 60 # how long to allow targets to drain for in seconds targets: [] # typically we do not specify targets at this point, this will be handled automatically by the ECS service # - Id: 10.0.0.2 # Port: 80 diff --git a/roles/deploy_container/tasks/action-create.yml b/roles/deploy_container/tasks/action-create.yml index fe37300d..3ec81194 100644 --- a/roles/deploy_container/tasks/action-create.yml +++ b/roles/deploy_container/tasks/action-create.yml @@ -175,6 +175,7 @@ health_check_path: "{{ deploy_container.aws_ecs.health_check.path }}" health_check_interval: "{{ deploy_container.aws_ecs.health_check.interval | default(omit) }}" healthy_threshold_count: "{{ deploy_container.aws_ecs.health_check.healthy_threshold_count | default(omit) }}" + deregistration_delay_timeout: "{{ deploy_container.aws_ecs.target_group_deregistration_delay_timeout }}" unhealthy_threshold_count: "{{ deploy_container.aws_ecs.health_check.unhealthy_threshold_count | default(omit) }}" successful_response_codes: "{{ deploy_container.aws_ecs.health_check.response_codes }}" target_type: ip