Wolfgang Kulhanek
2020-03-13 e2d8ee07cc3325d5d2f3726cad4e117e9303c416
commit | author | age
a637ad 1 ---
998e0c 2 - name: Set up combined ocp4_workload_quay_operator dictionary
WK 3   set_fact:
4     ocp4_workload_quay_operator: >-
5       {{ ocp4_workload_quay_operator_defaults
6        | combine(ocp4_workload_quay_operator_input  | default( {} ),
7                  ocp4_workload_quay_operator_secret | default( {} ), recursive=true)
8       }}
a637ad 9
998e0c 10 - name: Remove Red Hat Quay Operator
a637ad 11   k8s:
WK 12     state: absent
1598bb 13     definition: "{{ lookup('template', item ) | from_yaml }}"
WK 14   loop:
15   - ./templates/quay.j2
d111f6 16   - ./templates/subscription.j2
NS 17   - ./templates/operatorgroup.j2
ec18aa 18   - ./templates/catalogsourceconfig.j2
a637ad 19
e2d8ee 20 - name: Remove serviceaccounts from anyuid scc (if they are still there)
WK 21   shell: "oc adm policy remove-scc-from-user anyuid system:serviceaccount:quay-{{ ocp4_workload_quay_operator.project }}:{{ item }}"
22   loop:
23   - quay
24   - clair
25   ignore_errors: true
26
d111f6 27 - name: Remove Red Hat Quay Operator (Shared resources)
NS 28   k8s:
29     state: absent
30     definition: "{{ lookup('template', item ) | from_yaml }}"
31   loop:
32   - ./templates/pull_secret.j2
33   - ./templates/quay_superuser_secret.j2
34   - ./templates/quay_config_secret.j2
35   - ./templates/quay_ssl_certificate_secret.j2
36   - ./templates/project.j2
37
a637ad 38 # Leave this as the last task in the playbook.
WK 39 - name: remove_workload tasks complete
40   debug:
41     msg: "Remove Workload tasks completed successfully."
42   when: not silent|bool