Merge "Chunk up ceph-ansible output to prevent clogging the CLI"
This commit is contained in:
commit
01475936bd
@ -548,9 +548,23 @@ outputs:
|
|||||||
- '{{playbook_dir}}/ceph-ansible/inventory.yml'
|
- '{{playbook_dir}}/ceph-ansible/inventory.yml'
|
||||||
- '--extra-vars'
|
- '--extra-vars'
|
||||||
- '@{{playbook_dir}}/ceph-ansible/extra_vars.yml'
|
- '@{{playbook_dir}}/ceph-ansible/extra_vars.yml'
|
||||||
- name: run ceph-ansible
|
- name: run ceph-ansible (immediate log at {{playbook_dir}}/ceph-ansible/ceph_ansible_command.log)
|
||||||
with_items: "{{ceph_ansible_playbooks}}"
|
shell: |
|
||||||
shell: "{{ceph_ansible_command}} {{item}}"
|
set -e
|
||||||
|
{% for playbook in ceph_ansible_playbooks %}
|
||||||
|
echo "Running ceph-ansible playbook {{playbook}}"
|
||||||
|
{{ceph_ansible_command}} {{playbook}} 2>&1
|
||||||
|
{% endfor %}
|
||||||
|
# We want the output chunked into bits to prevent
|
||||||
|
# overflowing Zaqar message size
|
||||||
|
no_log: true
|
||||||
|
failed_when: false
|
||||||
|
register: outputs
|
||||||
|
- name: print ceph-ansible output in case of failure
|
||||||
|
debug:
|
||||||
|
var: outputs.stdout_lines | default([]) | union(outputs.stderr_lines | default([]))
|
||||||
|
failed_when: outputs.rc != 0
|
||||||
|
when: outputs.rc != 0
|
||||||
- name: create ceph-ansible fetch directory tarball in local backup
|
- name: create ceph-ansible fetch directory tarball in local backup
|
||||||
archive:
|
archive:
|
||||||
path: "{{playbook_dir}}/ceph-ansible/fetch_dir"
|
path: "{{playbook_dir}}/ceph-ansible/fetch_dir"
|
||||||
|
Loading…
Reference in New Issue
Block a user