mirror of
https://github.com/ansible/awx-operator.git
synced 2026-05-07 13:52:58 +00:00
Rename base roles
This commit is contained in:
36
roles/finalizer/tasks/main.yml
Normal file
36
roles/finalizer/tasks/main.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
- name: Check for existing secret key
|
||||
k8s_info:
|
||||
kind: Secret
|
||||
namespace: '{{ meta.namespace }}'
|
||||
name: '{{ meta.name }}-secret-key'
|
||||
register: secret_key_resources
|
||||
|
||||
- name: Check for existing postgres configuration
|
||||
k8s_info:
|
||||
kind: Secret
|
||||
namespace: '{{ meta.namespace }}'
|
||||
name: '{{ meta.name }}-postgres-configuration'
|
||||
register: postgres_config_resources
|
||||
|
||||
- name: Remove ownerReferences from PG configuration if it exists
|
||||
k8s:
|
||||
definition:
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: '{{ meta.name }}-postgres-configuration'
|
||||
namespace: '{{ meta.namespace }}'
|
||||
ownerReferences: null
|
||||
when: postgres_config_resources['resources'] | length > 0
|
||||
|
||||
- name: Remove ownerReferences from Tower Secret if it exists
|
||||
k8s:
|
||||
definition:
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: '{{ meta.name }}-secret-key'
|
||||
namespace: '{{ meta.namespace }}'
|
||||
ownerReferences: null
|
||||
when: secret_key_resources['resources'] | length > 0
|
||||
Reference in New Issue
Block a user