summaryrefslogtreecommitdiffstats
path: root/lib/ansible/playbooks
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2018-06-18 11:28:35 -0400
committerTim Rozet <trozet@redhat.com>2018-06-18 14:46:29 -0400
commit8dc27bd1443a52c177e6dedf550fd7d24a81e84e (patch)
tree13d73a5af473fcd03513928aa3b1cff2bcb426ac /lib/ansible/playbooks
parent83ef5ed70381583e1a419716cd9acbf9538074c6 (diff)
Fetch mistral logs from undercloud
/var/lib/mistral path contains logs for when ansible is invoked by TripleO for Ceph configuration as well as config download. This patch now archives and fetches that directory. Logs in previous releases like Queens store the Ceph logs in /var/log/mistral. Change-Id: I50c43e55efaa5dbcf8b7fb00b0e11cd3288fdd05 Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'lib/ansible/playbooks')
-rw-r--r--lib/ansible/playbooks/deploy_overcloud.yml21
1 files changed, 18 insertions, 3 deletions
diff --git a/lib/ansible/playbooks/deploy_overcloud.yml b/lib/ansible/playbooks/deploy_overcloud.yml
index 90c237be..d65fc271 100644
--- a/lib/ansible/playbooks/deploy_overcloud.yml
+++ b/lib/ansible/playbooks/deploy_overcloud.yml
@@ -81,12 +81,27 @@
- block:
- name: Execute Overcloud Deployment
shell: "{{ stackrc }} && bash deploy_command"
-
+ become: yes
+ become_user: stack
rescue:
- name: Show overcloud failures
shell: "{{ stackrc }} && openstack stack failures list overcloud --long"
- become: yes
- become_user: stack
+ become: yes
+ become_user: stack
+ always:
+ - name: Archive Mistral logs
+ archive:
+ path:
+ - /var/lib/mistral
+ - /var/log/mistral
+ dest: /root/mistral_logs.tar.gz
+ become: yes
+ - name: Fetch mistral logs
+ fetch:
+ src: /root/mistral_logs.tar.gz
+ dest: "{{ apex_temp_dir }}/"
+ flat: yes
+ become: yes
- name: Show Keystone output
shell: "{{ overcloudrc }} && {{ item }}"
when: debug