- name: Delete Infrastructure hosts: localhost connection: local gather_facts: False become: no vars_files: - "./env_vars.yml" - "./env_secret_vars.yml" tasks: - name: Destroy cloudformation template cloudformation: stack_name: "{{project_tag}}" state: "absent" region: "{{aws_region}}" disable_rollback: false tags: Stack: "project {{env_type}}-{{ guid }}" tags: [ destroying, destroy_cf_deployment ] register: cloudformation_result until: cloudformation_result|succeeded retries: 5 delay: 60 ignore_errors: yes - name: report Cloudformation error fail: msg: "FAIL {{ project_tag }} Destroy Cloudformation" when: not cloudformation_result|succeeded tags: [ destroying, destroy_cf_deployment ]