From 45ce8185dff2880cf007a34b5c6cea4b8cbc5026 Mon Sep 17 00:00:00 2001 From: aknochow Date: Tue, 29 Jul 2025 19:21:38 -0400 Subject: [PATCH] Reverting #2064 and Updating descriptions in backup and restore roles (#2060) * updating task descriptions in backup and restore roles * Revert "Run import_auth_config_to_gateway when public_url is defined (#2064)" This reverts commit 54293a0efbfd177a38ec6681a43857175a518b76. --- roles/backup/tasks/postgres.yml | 2 +- roles/installer/tasks/initialize_django.yml | 11 ----------- roles/installer/tasks/upgrade_postgres.yml | 2 +- roles/restore/tasks/postgres.yml | 4 ++-- 4 files changed, 4 insertions(+), 15 deletions(-) diff --git a/roles/backup/tasks/postgres.yml b/roles/backup/tasks/postgres.yml index c9662fdc..2124fbb8 100644 --- a/roles/backup/tasks/postgres.yml +++ b/roles/backup/tasks/postgres.yml @@ -72,7 +72,7 @@ command: >- touch {{ backup_dir }}/tower.db -- name: Set full resolvable host name for postgres pod +- name: Set resolvable_db_host set_fact: resolvable_db_host: '{{ (awx_postgres_type == "managed") | ternary(awx_postgres_host + "." + ansible_operator_meta.namespace + ".svc", awx_postgres_host) }}' # yamllint disable-line rule:line-length no_log: "{{ no_log }}" diff --git a/roles/installer/tasks/initialize_django.yml b/roles/installer/tasks/initialize_django.yml index d027d29c..ab2fe1c4 100644 --- a/roles/installer/tasks/initialize_django.yml +++ b/roles/installer/tasks/initialize_django.yml @@ -56,17 +56,6 @@ bash -c "awx-manage unregister_queue --queuename=tower" when: "'[tower capacity=' in legacy_queue.stdout" -- name: Import auth config when public_url is defined and gating version is defined - kubernetes.core.k8s_exec: - namespace: "{{ ansible_operator_meta.namespace }}" - pod: "{{ awx_web_pod_name }}" - container: "{{ ansible_operator_meta.name }}-web" - command: >- - bash -c "awx-manage import_auth_config_to_gateway" - when: - - gating_version | length - - public_base_url is defined - - name: Check for specified default execution environment pull credentials k8s_info: kind: Secret diff --git a/roles/installer/tasks/upgrade_postgres.yml b/roles/installer/tasks/upgrade_postgres.yml index ecf2225b..c63bc9f8 100644 --- a/roles/installer/tasks/upgrade_postgres.yml +++ b/roles/installer/tasks/upgrade_postgres.yml @@ -72,7 +72,7 @@ - "app.kubernetes.io/managed-by={{ deployment_type }}-operator" register: old_postgres_svc -- name: Set full resolvable host name for postgres pod +- name: Set resolvable_db_host set_fact: resolvable_db_host: "{{ old_postgres_svc['resources'][0]['metadata']['name'] }}.{{ ansible_operator_meta.namespace }}.svc" # yamllint disable-line rule:line-length no_log: "{{ no_log }}" diff --git a/roles/restore/tasks/postgres.yml b/roles/restore/tasks/postgres.yml index 221d8ec3..f11fa609 100644 --- a/roles/restore/tasks/postgres.yml +++ b/roles/restore/tasks/postgres.yml @@ -67,7 +67,7 @@ - "{{ deployment_name }}-web" when: this_deployment['resources'] | length -- name: Set full resolvable host name for postgres pod +- name: Set resolvable_db_host set_fact: resolvable_db_host: '{{ (awx_postgres_type == "managed") | ternary(awx_postgres_host + "." + ansible_operator_meta.namespace + ".svc." + cluster_name, awx_postgres_host) }}' # yamllint disable-line rule:line-length no_log: "{{ no_log }}" @@ -119,7 +119,7 @@ {{ pg_create_db }} when: force_drop_db -- name: Restore database dump to the new postgresql container +- name: Restore Postgres database kubernetes.core.k8s_exec: namespace: "{{ backup_pvc_namespace }}" pod: "{{ ansible_operator_meta.name }}-db-management"