--- - name: Build inventory hosts: localhost connection: local gather_facts: False become: no tasks: - when: cloud_provider == 'ec2' block: - name: Run infra-ec2-create-inventory Role include_role: name: infra-ec2-create-inventory - name: Run Common SSH Config Generator Role include_role: name: infra-common-ssh-config-generate when: "'bastions' in groups" - name: Set ssh config hosts: all gather_facts: false become: no tasks: - name: Set facts for remote access set_fact: ansible_ssh_extra_args: >- {{ ansible_ssh_extra_args|d() }} -F {{hostvars.localhost.output_dir}}/{{ env_type }}_{{ guid }}_ssh_conf - name: Unsubscribe systems hosts: all become: true gather_facts: false ignore_errors: true tasks: - shell: "subscription-manager unsubscribe --all" - name: Import default destroy playbook import_playbook: ../../cloud_providers/{{cloud_provider}}_destroy_env.yml