summaryrefslogtreecommitdiffstats
path: root/installer/roles/kubernetes/tasks/restore.yml
diff options
context:
space:
mode:
authorMarcelo Moreira de Mello <tchello.mello@gmail.com>2020-09-24 04:17:05 +0200
committerMarcelo Moreira de Mello <tchello.mello@gmail.com>2020-09-24 04:33:57 +0200
commitf1b8a63d9177355fc0abb985b0541253590a40ea (patch)
tree82f168a25bf8259054d99100a996c0b68283b95e /installer/roles/kubernetes/tasks/restore.yml
parentMerge pull request #8206 from ryanpetrello/more-bulk-update-last-job (diff)
downloadawx-f1b8a63d9177355fc0abb985b0541253590a40ea.tar.xz
awx-f1b8a63d9177355fc0abb985b0541253590a40ea.zip
Ability to import standard pgdump into Openshift
Diffstat (limited to '')
-rw-r--r--installer/roles/kubernetes/tasks/restore.yml17
1 files changed, 17 insertions, 0 deletions
diff --git a/installer/roles/kubernetes/tasks/restore.yml b/installer/roles/kubernetes/tasks/restore.yml
index e622b88334..8d6a6a3c3d 100644
--- a/installer/roles/kubernetes/tasks/restore.yml
+++ b/installer/roles/kubernetes/tasks/restore.yml
@@ -25,6 +25,18 @@
dest: "{{ playbook_dir }}/tower-openshift-restore"
extra_opts: [--strip-components=1]
+- name: Verify if common.tar.gz exists
+ stat:
+ path: "{{ playbook_dir }}/tower-openshift-restore/common.tar.gz"
+ register: common_tarball
+
+- name: Unarchive Tower backup from common.tar.gz
+ unarchive:
+ src: "{{ playbook_dir }}/tower-openshift-restore/common.tar.gz"
+ dest: "{{ playbook_dir }}/tower-openshift-restore"
+ extra_opts: [--strip-components=1]
+ when: common_tarball.stat.exists
+
- set_fact:
deployment_object: "deployment"
@@ -39,6 +51,11 @@
{{ kubectl_or_oc }} -n {{ kubernetes_namespace }} \
scale {{ deployment_object }} {{ kubernetes_deployment_name }} --replicas=0
+- name: Delete management pod
+ shell: |
+ {{ kubectl_or_oc }} -n {{ kubernetes_namespace }} \
+ delete pod ansible-tower-management --grace-period=0 --ignore-not-found
+
- name: Wait for scale down
shell: |
{{ kubectl_or_oc }} -n {{ kubernetes_namespace }} get pods \