- name: Step 00xxxxx post software
|
hosts: support
|
gather_facts: False
|
become: yes
|
vars_files:
|
- "{{ ANSIBLE_REPO_PATH }}/configs/{{ env_type }}/env_vars.yml"
|
tasks:
|
- debug:
|
msg: "Post-Software tasks Started"
|
|
- name: Configure windows AD on first windows machine
|
hosts:
|
- windows[0]
|
gather_facts: False
|
vars_files:
|
- "{{ ANSIBLE_REPO_PATH }}/configs/{{ env_type }}/env_vars.yml"
|
- "{{ ANSIBLE_REPO_PATH }}/configs/{{ env_type }}/env_secret_vars.yml"
|
tags:
|
- step004
|
- common_tasks
|
- windows_tasks
|
roles:
|
- { role: "{{ ANSIBLE_REPO_PATH }}/roles/windows-ad", when: install_win_ad | bool }
|
tasks:
|
- name: Reboot upon promotion
|
win_reboot:
|
when: install_win_ad | bool
|
|
- name: Wait for connection
|
wait_for_connection:
|
when: install_win_ad | bool
|
|
- name: Step lab post software deployment
|
hosts: bastions
|
gather_facts: False
|
become: yes
|
tags:
|
- opentlc_bastion_tasks
|
vars_files:
|
- "{{ ANSIBLE_REPO_PATH }}/configs/{{ env_type }}/env_vars.yml"
|
tasks:
|
- import_role:
|
name: "{{ ANSIBLE_REPO_PATH }}/roles/bastion-opentlc-ipa"
|
when: install_ipa_client|bool
|
|
- name: Copy Tower License File
|
copy:
|
src: "~/secrets/ans-tower-lab_license.txt"
|
dest: /root/license.txt
|
|
- name: Copy Openstack PEM key
|
copy:
|
src: "~/secrets/ans-tower-lab_openstack.pem"
|
dest: /root/.ssh/opentstack.pem
|
owner: root
|
group: root
|
mode: 0400
|
|
- name: Post Tower configs
|
hosts: towers[0]
|
become: yes
|
vars_files:
|
- "{{ ANSIBLE_REPO_PATH }}/configs/{{ env_type }}/env_vars.yml"
|
roles:
|
- { role: "{{ ANSIBLE_REPO_PATH }}/roles/tower_demo", when: deploy_tower_demo | d(false) | bool }
|
|
- name: Install Tower For Homework
|
hosts: bastions
|
become: yes
|
vars_files:
|
- "{{ ANSIBLE_REPO_PATH }}/configs/{{ env_type }}/env_vars.yml"
|
- "{{ ANSIBLE_REPO_PATH }}/configs/{{ env_type }}/env_secret_vars.yml"
|
roles:
|
- { role: "{{ ANSIBLE_REPO_PATH }}/roles/install-tower", when: deploy_tower_homework | d(false) | bool }
|
|
- name: PostSoftware flight-check
|
hosts: localhost
|
connection: local
|
gather_facts: false
|
become: false
|
vars_files:
|
- "{{ ANSIBLE_REPO_PATH }}/configs/{{ env_type }}/env_vars.yml"
|
- "{{ ANSIBLE_REPO_PATH }}/configs/{{ env_type }}/env_secret_vars.yml"
|
tags:
|
- post_flight_check
|
tasks:
|
- debug:
|
msg: "Post-Software checks completed successfully"
|