mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-28 06:13:11 +00:00
* Replace api version for deployment kind to apps/v1 * Add new multiple ingress spec and deprecate hostname and ingress_tls_secret * Manage new ingress_hosts.tls_secret backup separately * Fix ci molecule lint warnings and error * Fix documentation * Fix ingress_hosts tls_secret key being optional * Remove fieldDependency:ingress_type:Ingress for Ingress Hosts * Fix scenario when neither hostname or ingress_hosts is defined --------- Co-authored-by: Guillaume Lefevre <guillaume.lefevre@agoda.com> Co-authored-by: Seth Foster <fosterseth@users.noreply.github.com> Co-authored-by: Christian Adams <chadams@redhat.com>
25 lines
671 B
YAML
25 lines
671 B
YAML
---
|
|
|
|
- name: Get secret
|
|
k8s_info:
|
|
version: v1
|
|
kind: Secret
|
|
namespace: '{{ ansible_operator_meta.namespace }}'
|
|
name: "{{ item }}"
|
|
register: _secret
|
|
no_log: "{{ no_log }}"
|
|
|
|
- name: Backup secret if exists
|
|
block:
|
|
- name: Set secret key
|
|
set_fact:
|
|
_data: "{{ _secret['resources'][0]['data'] }}"
|
|
_type: "{{ _secret['resources'][0]['type'] }}"
|
|
no_log: "{{ no_log }}"
|
|
|
|
- name: Create and Add secret names and data to dictionary
|
|
set_fact:
|
|
secret_dict: "{{ secret_dict | default({}) | combine({item: { 'name': item, 'data': _data, 'type': _type }}) }}"
|
|
no_log: "{{ no_log }}"
|
|
when: _secret | length
|