| | |
| | | --- |
| | | # Implement your Workload removal tasks here |
| | | |
| | | - name: Remove Red Hat Quay Operator |
| | | - name: Remove Quay Resources |
| | | k8s: |
| | | state: absent |
| | | definition: "{{ lookup('template', item ) | from_yaml }}" |
| | | loop: |
| | | - ./templates/quay.j2 |
| | | |
| | | - name: Remove Red Hat Quay Operator (OLM install) |
| | | when: _quay_operator_hub | bool |
| | | k8s: |
| | | state: absent |
| | | definition: "{{ lookup('template', item ) | from_yaml }}" |
| | | loop: |
| | | - ./templates/subscription.j2 |
| | | - ./templates/operatorgroup.j2 |
| | | |
| | | - name: Remove Red Hat Quay Operator (Manual install) |
| | | when: not _quay_operator_hub | bool |
| | | k8s: |
| | | state: absent |
| | | definition: "{{ lookup('template', item ) | from_yaml }}" |
| | | loop: |
| | | - ./templates/operator.j2 |
| | | - ./templates/service_account.j2 |
| | | - ./templates/role.j2 |
| | | - ./templates/role_binding.j2 |
| | | - ./templates/cluster_role_binding.j2 |
| | | - ./templates/pull_secret.j2 |
| | | - ./templates/quay_superuser_secret.j2 |
| | | - ./templates/quay_config_secret.j2 |
| | | - ./templates/quay_ssl_certificate_secret.j2 |
| | | - ./templates/project.j2 |
| | | # NOT removing Cluster Resources because there may be |
| | | # other projects with Quay Operators in them. |
| | | # Removing Cluster Resources would screw those up. |
| | | #- ./templates/cluster_role.j2 |
| | | #- ./templates/crd.j2 |
| | | |
| | | - 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: |