--- - name: Delete any existing management pod k8s: name: "{{ ansible_operator_meta.name }}-db-management" kind: Pod namespace: "{{ backup_pvc_namespace }}" state: absent force: true - name: Remove ownerReferences from secrets to avoid garbage collection k8s: definition: apiVersion: v1 kind: Secret metadata: name: '{{ item }}' namespace: '{{ ansible_operator_meta.namespace }}' ownerReferences: null loop: - '{{ secret_key_secret }}' - '{{ admin_password_secret }}' - '{{ broadcast_websocket_secret }}' - '{{ postgres_configuration_secret }}' no_log: "{{ no_log }}" - name: Cleanup temp spec file file: path: "{{ tmp_spec.path }}" state: absent when: tmp_spec.path is defined - name: Cleanup temp secret vars file file: path: "{{ secret_vars.path }}" state: absent when: secret_vars.path is defined