--- - name: Set up combined ocp4_workload_quay_operator dictionary set_fact: ocp4_workload_quay_operator: >- {{ ocp4_workload_quay_operator_defaults | combine(ocp4_workload_quay_operator_input | default( {} ), ocp4_workload_quay_operator_secret | default( {} ), recursive=true) }} - name: Remove Red Hat Quay Operator k8s: state: absent definition: "{{ lookup('template', item ) | from_yaml }}" loop: - ./templates/quay.j2 - ./templates/subscription.j2 - ./templates/operatorgroup.j2 - ./templates/catalogsourceconfig.j2 - name: Remove serviceaccounts from anyuid scc (if they are still there) shell: "oc adm policy remove-scc-from-user anyuid system:serviceaccount:quay-{{ ocp4_workload_quay_operator.project }}:{{ item }}" loop: - quay - clair ignore_errors: true - name: Remove Red Hat Quay Operator (Shared resources) k8s: state: absent definition: "{{ lookup('template', item ) | from_yaml }}" loop: - ./templates/pull_secret.j2 - ./templates/quay_superuser_secret.j2 - ./templates/quay_config_secret.j2 - ./templates/quay_ssl_certificate_secret.j2 - ./templates/project.j2 # Leave this as the last task in the playbook. - name: remove_workload tasks complete debug: msg: "Remove Workload tasks completed successfully." when: not silent|bool