Fix ansible-lint errors in the role
Also avoid displaying "failed" steps near the finishing of the deployment. This will be less confusing for newcomers who are using Quickstart. Change-Id: Icdd7fded6b8cac6f083e929b6aedb03cafc004d8
This commit is contained in:
parent
a461632128
commit
04401e852d
|
@ -10,27 +10,26 @@
|
|||
#/usr/bin/awk '/Stack overcloud CREATE_/ && /FAILED/{exit 1}' {{ deploy_log }}
|
||||
|
||||
- name: Check overcloud deploy status
|
||||
shell: >
|
||||
! /usr/bin/grep 'Stack overcloud CREATE_FAILED' {{ deploy_log }}
|
||||
command: >
|
||||
/usr/bin/grep 'Stack overcloud CREATE_FAILED' {{ deploy_log }}
|
||||
register: deploy_result
|
||||
ignore_errors: true
|
||||
failed_when: deploy_result.rc > 1
|
||||
changed_when: false
|
||||
|
||||
- name: write out overcloud status to a file on the localhost
|
||||
shell: >
|
||||
echo '{ "overcloud_deploy_result": "failed" }' > "{{ local_working_dir }}/overcloud_deployment_result.json"
|
||||
delegate_to: localhost
|
||||
when: deploy_result.rc != 0
|
||||
when: deploy_result.rc == 0
|
||||
|
||||
- name: write out overcloud status to a file on the localhost
|
||||
shell: >
|
||||
echo '{ "overcloud_deploy_result": "passed" }' > "{{ local_working_dir }}/overcloud_deployment_result.json"
|
||||
delegate_to: localhost
|
||||
when: deploy_result.rc == 0
|
||||
when: deploy_result.rc == 1
|
||||
|
||||
- name: import deployment status from file
|
||||
include_vars: "{{ local_working_dir }}/overcloud_deployment_result.json"
|
||||
|
||||
- name: echo deployment_status
|
||||
debug: var=overcloud_deploy_result
|
||||
|
||||
|
||||
|
|
|
@ -11,4 +11,4 @@
|
|||
shell: |
|
||||
{{ working_dir }}/overcloud-deploy-post.sh \
|
||||
> {{ post_deploy_log }} 2>&1
|
||||
|
||||
changed_when: true
|
||||
|
|
Loading…
Reference in New Issue