diff --git a/roles/backup/tasks/awx-cro.yml b/roles/backup/tasks/awx-cro.yml index 974a1b4f6..755704daf 100644 --- a/roles/backup/tasks/awx-cro.yml +++ b/roles/backup/tasks/awx-cro.yml @@ -31,5 +31,6 @@ k8s_cp: namespace: "{{ backup_pvc_namespace }}" pod: "{{ ansible_operator_meta.name }}-db-management" + container: "{{ ansible_operator_meta.name }}-db-management" remote_path: "{{ backup_dir }}/awx_object" content: "{{ awx_spec | to_yaml }}" diff --git a/roles/backup/tasks/delete_backup.yml b/roles/backup/tasks/delete_backup.yml index 4a2e5bf59..8af069fa1 100644 --- a/roles/backup/tasks/delete_backup.yml +++ b/roles/backup/tasks/delete_backup.yml @@ -3,5 +3,6 @@ k8s_exec: namespace: "{{ backup_pvc_namespace }}" pod: "{{ ansible_operator_meta.name }}-db-management" + container: "{{ ansible_operator_meta.name }}-db-management" command: >- bash -c 'rm -rf {{ backup_dir }}' diff --git a/roles/backup/tasks/postgres.yml b/roles/backup/tasks/postgres.yml index b885abbf3..c9662fdc8 100644 --- a/roles/backup/tasks/postgres.yml +++ b/roles/backup/tasks/postgres.yml @@ -60,6 +60,7 @@ k8s_exec: namespace: "{{ backup_pvc_namespace }}" pod: "{{ ansible_operator_meta.name }}-db-management" + container: "{{ ansible_operator_meta.name }}-db-management" command: >- mkdir -p {{ backup_dir }} @@ -67,6 +68,7 @@ k8s_exec: namespace: "{{ backup_pvc_namespace }}" pod: "{{ ansible_operator_meta.name }}-db-management" + container: "{{ ansible_operator_meta.name }}-db-management" command: >- touch {{ backup_dir }}/tower.db @@ -126,6 +128,7 @@ k8s_exec: namespace: "{{ backup_pvc_namespace }}" pod: "{{ ansible_operator_meta.name }}-db-management" + container: "{{ ansible_operator_meta.name }}-db-management" command: | bash -c " function end_keepalive { diff --git a/roles/backup/tasks/secrets.yml b/roles/backup/tasks/secrets.yml index 134698fe4..cc70721c2 100644 --- a/roles/backup/tasks/secrets.yml +++ b/roles/backup/tasks/secrets.yml @@ -50,6 +50,7 @@ k8s_cp: namespace: "{{ backup_pvc_namespace }}" pod: "{{ ansible_operator_meta.name }}-db-management" + container: "{{ ansible_operator_meta.name }}-db-management" remote_path: "{{ backup_dir }}/secrets.yml" content: "{{ secrets | to_yaml }}" no_log: "{{ no_log }}" diff --git a/roles/restore/tasks/import_vars.yml b/roles/restore/tasks/import_vars.yml index a9ace5165..450f4f5f9 100644 --- a/roles/restore/tasks/import_vars.yml +++ b/roles/restore/tasks/import_vars.yml @@ -12,6 +12,7 @@ k8s_cp: namespace: "{{ backup_pvc_namespace }}" pod: "{{ ansible_operator_meta.name }}-db-management" + container: "{{ ansible_operator_meta.name }}-db-management" remote_path: "{{ backup_dir }}/awx_object" local_path: "{{ tmp_spec.path }}" state: from_pod diff --git a/roles/restore/tasks/init.yml b/roles/restore/tasks/init.yml index cb9138874..0d6914384 100644 --- a/roles/restore/tasks/init.yml +++ b/roles/restore/tasks/init.yml @@ -98,6 +98,7 @@ k8s_exec: namespace: "{{ backup_pvc_namespace }}" pod: "{{ ansible_operator_meta.name }}-db-management" + container: "{{ ansible_operator_meta.name }}-db-management" command: >- bash -c "stat {{ backup_dir }}" register: stat_backup_dir diff --git a/roles/restore/tasks/postgres.yml b/roles/restore/tasks/postgres.yml index 617a23ace..af3d2b595 100644 --- a/roles/restore/tasks/postgres.yml +++ b/roles/restore/tasks/postgres.yml @@ -115,6 +115,7 @@ k8s_exec: namespace: "{{ backup_pvc_namespace }}" pod: "{{ ansible_operator_meta.name }}-db-management" + container: "{{ ansible_operator_meta.name }}-db-management" command: | bash -c " function end_keepalive { diff --git a/roles/restore/tasks/secrets.yml b/roles/restore/tasks/secrets.yml index 89a0454d8..67cec3895 100644 --- a/roles/restore/tasks/secrets.yml +++ b/roles/restore/tasks/secrets.yml @@ -10,6 +10,7 @@ k8s_cp: namespace: "{{ backup_pvc_namespace }}" pod: "{{ ansible_operator_meta.name }}-db-management" + container: "{{ ansible_operator_meta.name }}-db-management" remote_path: "{{ backup_dir }}/secrets.yml" local_path: "{{ tmp_secrets.path }}" state: from_pod