Merge "Grab logs in the case of errors"
This commit is contained in:
commit
6d8409f46e
@ -15,6 +15,14 @@
|
|||||||
|
|
||||||
- hosts: bridge.openstack.org
|
- hosts: bridge.openstack.org
|
||||||
tasks:
|
tasks:
|
||||||
|
- name: Ensure run dir
|
||||||
|
file:
|
||||||
|
state: directory
|
||||||
|
path: /var/run/ansible
|
||||||
|
|
||||||
|
- name: Run the production playbook and capture logs
|
||||||
|
block:
|
||||||
|
|
||||||
- name: Log a playbook start header
|
- name: Log a playbook start header
|
||||||
become: yes
|
become: yes
|
||||||
shell: 'echo "Running {{ ansible_date_time.iso8601 }}: ansible-playbook -v -f {{ ansible_forks }} /opt/system-config/playbooks/{{ playbook_name }}" > /var/log/ansible/{{ playbook_name }}.log'
|
shell: 'echo "Running {{ ansible_date_time.iso8601 }}: ansible-playbook -v -f {{ ansible_forks }} /opt/system-config/playbooks/{{ playbook_name }}" > /var/log/ansible/{{ playbook_name }}.log'
|
||||||
@ -23,6 +31,8 @@
|
|||||||
become: yes
|
become: yes
|
||||||
shell: 'ansible-playbook -v -f {{ ansible_forks }} /opt/system-config/playbooks/{{ playbook_name }} >> /var/log/ansible/{{ playbook_name }}.log'
|
shell: 'ansible-playbook -v -f {{ ansible_forks }} /opt/system-config/playbooks/{{ playbook_name }} >> /var/log/ansible/{{ playbook_name }}.log'
|
||||||
|
|
||||||
|
always:
|
||||||
|
|
||||||
# Not using normal zuul job roles as bridge.openstack.org is not a
|
# Not using normal zuul job roles as bridge.openstack.org is not a
|
||||||
# test node with all the normal bits in place.
|
# test node with all the normal bits in place.
|
||||||
- name: Collect log output
|
- name: Collect log output
|
||||||
|
Loading…
x
Reference in New Issue
Block a user