From ee0a88df3321515bde72859944f3cae00323b911 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Wed, 19 May 2021 13:59:41 +0200 Subject: [PATCH] copr-be: terminate spot instances on shutdown Per the following error: fatal: [127.0.0.1]: FAILED! => {"changed": false, "msg": "instance_initiated_shutdown_behavior=stop is not supported for spot instances."} --- roles/copr/backend/files/provision/spinup_aws_spot_task.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/copr/backend/files/provision/spinup_aws_spot_task.yml b/roles/copr/backend/files/provision/spinup_aws_spot_task.yml index c1b94c63bb..18b0fdb993 100644 --- a/roles/copr/backend/files/provision/spinup_aws_spot_task.yml +++ b/roles/copr/backend/files/provision/spinup_aws_spot_task.yml @@ -26,6 +26,7 @@ aws_secret_key: "{{ aws_secret_key }}" volumes: "{% if instance_volumes is defined %}{{ instance_volumes }}{% else %}[]{% endif %}" spot_price: "{{ spot_price }}" + instance_initiated_shutdown_behavior: terminate register: ec2 - name: Add new instance to host group