diff options
author | Tim Rozet <trozet@redhat.com> | 2017-08-31 13:37:20 -0400 |
---|---|---|
committer | Tim Rozet <trozet@redhat.com> | 2017-08-31 17:18:42 -0400 |
commit | 7c61b83d4a8c41eac0d80e7783cdf1702f91f9e6 (patch) | |
tree | 6fc5d7018197dbdcb65bddceb5ecadfaa306d774 /lib/ansible | |
parent | 1ae72825a39a3b457ebdbeccfeadf3de6ce9018f (diff) |
Adds Undercloud retry and log fetch
Retry to install the undercloud if it fails due to sometimes failing.
Also copy undercloud log over to host temp dir.
Change-Id: I50f98c4f0d52fa6bb56d9dcd0766bbe745160452
Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'lib/ansible')
-rw-r--r-- | lib/ansible/playbooks/configure_undercloud.yml | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/lib/ansible/playbooks/configure_undercloud.yml b/lib/ansible/playbooks/configure_undercloud.yml index aa6c960a..f19218c3 100644 --- a/lib/ansible/playbooks/configure_undercloud.yml +++ b/lib/ansible/playbooks/configure_undercloud.yml @@ -47,10 +47,22 @@ regexp: '_link_ip_address_pxe_configs' line: '_link_mac_pxe_configs(task)' when: aarch64 - - name: undercloud install - shell: openstack undercloud install &> apex-undercloud-install.log - become: yes - become_user: stack + - block: + - name: undercloud install + shell: openstack undercloud install &> apex-undercloud-install.log + become: yes + become_user: stack + rescue: + - name: undercloud install retry + shell: openstack undercloud install >> apex-undercloud-install.log 2>&1 + become: yes + become_user: stack + always: + - name: fetch undercloud log + fetch: + src: /home/stack/apex-undercloud-install.log + dest: "{{ apex_temp_dir }}/" + flat: yes - name: openstack-configs nova shell: openstack-config --set /etc/nova/nova.conf DEFAULT {{ item }} become: yes |