diff options
Diffstat (limited to 'installer')
-rw-r--r-- | installer/roles/kubernetes/tasks/restore.yml | 17 |
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 \ |