Tidy up ctrl logfile backup before compute deploy mixed OS job
In [1] we merged some plays for use with mixed OS version job. This is a followup to review comments at [1] in particular moving the copying of controller logfiles to the end of the controller deploy play, and using copy instead of shell. [1] https://review.opendev.org/c/openstack/tripleo-quickstart-extras/+/841764/34#message-691960e27fab386ef4e65ea4f5291dd991f01ea5 Change-Id: I712fa3ee8f186ac323693ad15f3986a47bd569cc
This commit is contained in:
parent
c661d74da7
commit
ecfc3c8873
|
@ -4,14 +4,6 @@
|
|||
gather_facts: false
|
||||
tags:
|
||||
- overcloud-prep-containers
|
||||
pre_tasks:
|
||||
# TODO(marios): tidy this up use copy module & move to new play
|
||||
- name: rename controller logfiles so we can keep them
|
||||
shell: |
|
||||
for file in containers-prepare-parameter.yaml overcloud_deploy.log overcloud_roles.yaml overcloud-topology-config.yaml overcloud-deploy.sh ; do
|
||||
cp $file "ctrl_$file";
|
||||
done
|
||||
failed_when: false
|
||||
roles:
|
||||
- role: overcloud-prep-containers
|
||||
when: containerized_overcloud|bool
|
||||
|
|
|
@ -28,3 +28,24 @@
|
|||
debug: var=overcloud_deploy_result
|
||||
failed_when: overcloud_deploy_result == "failed"
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Backup controller logfiles before compute deployment overwrites them
|
||||
hosts: undercloud
|
||||
gather_facts: false
|
||||
vars:
|
||||
backup_ctrl_files:
|
||||
- containers-prepare-parameter.yaml
|
||||
- overcloud_deploy.log
|
||||
- overcloud_roles.yaml
|
||||
- overcloud-topology-config.yaml
|
||||
- overcloud-deploy.sh
|
||||
tags:
|
||||
- overcloud-deploy
|
||||
tasks:
|
||||
- name: Rename controller logfiles so we can keep them
|
||||
copy:
|
||||
remote_src: true
|
||||
src: "/home/zuul/{{ item }}"
|
||||
dest: "/home/zuul/ctrl_{{ item }}"
|
||||
loop: "{{ backup_ctrl_files|flatten }}"
|
||||
failed_when: false
|
||||
|
|
Loading…
Reference in New Issue