mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-26 21:33:14 +00:00
28 lines
1.2 KiB
YAML
28 lines
1.2 KiB
YAML
---
|
|
- block:
|
|
- name: Define secrets name
|
|
set_fact:
|
|
_admin_password: '{{ tower_admin_password_secret | length | ternary(tower_admin_password_secret, meta.name + "-admin-password") }}'
|
|
_secret_key: '{{ tower_secret_key_secret | length | ternary(tower_secret_key_secret, meta.name + "-secret-key") }}'
|
|
# yamllint disable-line rule:line-length
|
|
_broadcast_websocket_secret: '{{ tower_broadcast_websocket_secret | length | ternary(tower_broadcast_websocket_secret, meta.name + "-broadcast-websocket") }}' # noqa 204
|
|
# yamllint disable-line rule:line-length
|
|
_postgres_configuration: '{{ tower_postgres_configuration_secret | length | ternary(tower_postgres_configuration_secret, meta.name + "-postgres-configuration") }}' # noqa 204
|
|
|
|
- name: Remove ownerReferences reference
|
|
k8s:
|
|
definition:
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: '{{ item }}'
|
|
namespace: '{{ meta.namespace }}'
|
|
ownerReferences: null
|
|
loop:
|
|
- '{{ _admin_password }}'
|
|
- '{{ _secret_key }}'
|
|
- '{{ _postgres_configuration }}'
|
|
- '{{ _broadcast_websocket_secret }}'
|
|
|
|
when: not tower_garbage_collect_secrets | bool
|