Jim Rigsbee
2019-07-22 0d0d0e99169d9285f46b3fd5fc425843c42fff89
commit | author | age
9afa8d 1 ---
WK 2 # Implement your Workload removal tasks here
3
716ac9 4 - name: Delete Nexus
9afa8d 5   k8s:
WK 6     state: absent
716ac9 7     definition: "{{ lookup('template', './templates/opentlc-nexus.j2' ) | from_yaml }}"
0d0d0e 8   when: _nexus_deploy_nexus_instance|bool
JR 9   
716ac9 10 - name: Wait 15 seconds for the Nexus to disappear
9afa8d 11   wait_for: timeout=15
WK 12   delegate_to: localhost
13
716ac9 14 # Delete all objects except the project (there may be other stuff in it)
WK 15 - name: Delete OpenShift Objects for Nexus Operator (including the OPENTLC Nexus)
9afa8d 16   k8s:
WK 17     state: absent
18     definition: "{{ lookup('template', item ) | from_yaml }}"
19   loop:
20   - ./templates/operator.j2
21   - ./templates/role_binding.j2
22   - ./templates/role.j2
23   - ./templates/service_account.j2
24   - ./templates/crd.j2
25
26 # Leave this as the last task in the playbook.
27 - name: remove_workload tasks complete
28   debug:
29     msg: "Remove Workload tasks completed successfully."
30   when: not silent|bool