CI: Redirect stderr to ansible logs

Currently Kayobe stderr is logged to the Zuul playbook output. This
change redirects stderr to the ansible log files.

Change-Id: Ia2f25a2e41859159275d418b57ab59bb97f58d6a
This commit is contained in:
Mark Goddard 2020-02-13 14:36:28 +00:00
parent 2fcdff101f
commit ac88bc2dfb
6 changed files with 18 additions and 18 deletions

View File

@ -22,7 +22,7 @@
- name: Ensure kayobe is installed
shell:
cmd: dev/install.sh > {{ logs_dir }}/ansible/install
cmd: dev/install.sh &> {{ logs_dir }}/ansible/install
chdir: "{{ kayobe_src_dir }}"
- name: Configure the firewall

View File

@ -5,23 +5,23 @@
tasks:
- name: Ensure overcloud is deployed
shell:
cmd: "{{ kayobe_src_dir }}/dev/overcloud-deploy.sh > {{ logs_dir }}/ansible/overcloud-deploy"
cmd: "{{ kayobe_src_dir }}/dev/overcloud-deploy.sh &> {{ logs_dir }}/ansible/overcloud-deploy"
- name: Ensure test Tenks cluster is deployed
shell:
# Pass absolute source directory, since otherwise the `chdir` will
# cause this to fail.
cmd: dev/tenks-deploy-compute.sh '{{ tenks_src_dir }}' > {{ logs_dir }}/ansible/tenks-deploy
cmd: dev/tenks-deploy-compute.sh '{{ tenks_src_dir }}' &> {{ logs_dir }}/ansible/tenks-deploy
chdir: "{{ kayobe_src_dir }}"
- name: Perform testing of the virtualized machines
# We must do this before tenks-deploy as that will stop the nova_libvirt
# container
shell:
cmd: dev/overcloud-test-vm.sh > {{ logs_dir }}/ansible/overcloud-test-vm
cmd: dev/overcloud-test-vm.sh &> {{ logs_dir }}/ansible/overcloud-test-vm
chdir: "{{ kayobe_src_dir }}"
- name: Perform testing of the baremetal machines
shell:
cmd: dev/overcloud-test-baremetal.sh > {{ logs_dir }}/ansible/overcloud-test-baremetal
cmd: dev/overcloud-test-baremetal.sh &> {{ logs_dir }}/ansible/overcloud-test-baremetal
chdir: "{{ kayobe_src_dir }}"

View File

@ -8,7 +8,7 @@
- block:
- name: Ensure kayobe is installed
shell:
cmd: dev/install.sh > {{ logs_dir }}/ansible/install-pre-upgrade
cmd: dev/install.sh &> {{ logs_dir }}/ansible/install-pre-upgrade
chdir: "{{ previous_kayobe_src_dir }}"
- name: Configure the firewall
@ -21,7 +21,7 @@
- name: Ensure overcloud is deployed
shell:
cmd: dev/overcloud-deploy.sh > {{ logs_dir }}/ansible/overcloud-deploy-pre-upgrade
cmd: dev/overcloud-deploy.sh &> {{ logs_dir }}/ansible/overcloud-deploy-pre-upgrade
chdir: "{{ previous_kayobe_src_dir }}"
- name: Ensure test Tenks cluster is deployed
@ -29,7 +29,7 @@
# Pass absolute source directory, since otherwise the `chdir` will
# cause this to fail. Don't use previous_kayobe_source_dir as
# tenks-deploy-compute.sh does not exist there.
cmd: dev/tenks-deploy-compute.sh '{{ tenks_src_dir }}' > {{ logs_dir }}/ansible/tenks-deploy
cmd: dev/tenks-deploy-compute.sh '{{ tenks_src_dir }}' &> {{ logs_dir }}/ansible/tenks-deploy
chdir: "{{ kayobe_src_dir }}"
environment:
@ -64,30 +64,30 @@
- block:
- name: Perform testing of the VMs in the overcloud prior to upgrade
shell:
cmd: dev/overcloud-test-vm.sh > {{ logs_dir }}/ansible/overcloud-test-vm-pre-upgrade
cmd: dev/overcloud-test-vm.sh &> {{ logs_dir }}/ansible/overcloud-test-vm-pre-upgrade
chdir: "{{ previous_kayobe_src_dir }}"
- name: Perform testing of the baremetal machines in the overcloud prior to upgrade
shell:
cmd: dev/overcloud-test-baremetal.sh > {{ logs_dir }}/ansible/overcloud-test-bm-pre-upgrade
cmd: dev/overcloud-test-baremetal.sh &> {{ logs_dir }}/ansible/overcloud-test-bm-pre-upgrade
chdir: "{{ previous_kayobe_src_dir }}"
# Upgrade Kayobe, and use it to perform an upgrade of the control plane.
- name: Ensure overcloud is upgraded
shell:
cmd: "{{ kayobe_src_dir }}/dev/overcloud-upgrade.sh > {{ logs_dir }}/ansible/overcloud-upgrade"
cmd: "{{ kayobe_src_dir }}/dev/overcloud-upgrade.sh &> {{ logs_dir }}/ansible/overcloud-upgrade"
# Perform a smoke test against the upgraded current release.
- name: Perform testing of VMs in the upgraded overcloud
shell:
cmd: dev/overcloud-test-vm.sh > {{ logs_dir }}/ansible/overcloud-test-vm-post-upgrade
cmd: dev/overcloud-test-vm.sh &> {{ logs_dir }}/ansible/overcloud-test-vm-post-upgrade
chdir: "{{ kayobe_src_dir }}"
- name: Perform testing of the baremetal machines in the upgraded overcloud
shell:
cmd: dev/overcloud-test-baremetal.sh > {{ logs_dir }}/ansible/overcloud-test-bm-post-upgrade
cmd: dev/overcloud-test-baremetal.sh &> {{ logs_dir }}/ansible/overcloud-test-bm-post-upgrade
chdir: "{{ kayobe_src_dir }}"
environment:

View File

@ -32,5 +32,5 @@
- name: Ensure kayobe is installed
shell:
cmd: dev/install.sh > {{ logs_dir }}/ansible/install
cmd: dev/install.sh &> {{ logs_dir }}/ansible/install
chdir: "{{ kayobe_src_dir }}"

View File

@ -7,4 +7,4 @@
tasks:
- name: Ensure seed is deployed
shell:
cmd: "{{ kayobe_src_dir }}/dev/seed-deploy.sh > {{ logs_dir }}/ansible/seed-deploy"
cmd: "{{ kayobe_src_dir }}/dev/seed-deploy.sh &> {{ logs_dir }}/ansible/seed-deploy"

View File

@ -8,12 +8,12 @@
- block:
- name: Ensure kayobe is installed
shell:
cmd: dev/install.sh > {{ logs_dir }}/ansible/install-pre-upgrade
cmd: dev/install.sh &> {{ logs_dir }}/ansible/install-pre-upgrade
chdir: "{{ previous_kayobe_src_dir }}"
- name: Ensure seed is deployed
shell:
cmd: dev/seed-deploy.sh > {{ logs_dir }}/ansible/seed-deploy-pre-upgrade
cmd: dev/seed-deploy.sh &> {{ logs_dir }}/ansible/seed-deploy-pre-upgrade
chdir: "{{ previous_kayobe_src_dir }}"
environment:
KAYOBE_CONFIG_SOURCE_PATH: "{{ previous_kayobe_config_src_dir }}"
@ -50,7 +50,7 @@
- name: Ensure seed is upgraded
shell:
cmd: "{{ kayobe_src_dir }}/dev/seed-upgrade.sh > {{ logs_dir }}/ansible/seed-upgrade"
cmd: "{{ kayobe_src_dir }}/dev/seed-upgrade.sh &> {{ logs_dir }}/ansible/seed-upgrade"
# TODO(mgoddard): Perform a smoke test against the upgraded current release.
environment: