| | |
| | | |
| | | - name: Destroy cloudformation template |
| | | cloudformation: |
| | | aws_access_key: "{{ aws_access_key_id }}" |
| | | aws_secret_key: "{{ aws_secret_access_key }}" |
| | | stack_name: "{{project_tag}}" |
| | | state: "absent" |
| | | region: "{{aws_region_final|d(aws_region)}}" |
| | |
| | | - destroy_cf_deployment |
| | | - destroy_cloud_deployment |
| | | register: cloudformation_result |
| | | until: cloudformation_result|succeeded |
| | | until: cloudformation_result is succeeded |
| | | retries: 5 |
| | | delay: 60 |
| | | ignore_errors: yes |
| | |
| | | fail: |
| | | msg: "FAIL {{ project_tag }} Destroy Cloudformation" |
| | | when: |
| | | - not cloudformation_result|succeeded |
| | | - not cloudformation_result is succeeded |
| | | - cloud_provider == 'ec2' |
| | | tags: |
| | | - destroying |