Fix cinder_api_apache error during upgrade.

In I35c8d9985df21b3084fba558687e1f408e5a0878 we removed the
cinder_api_apache from step 2.  This cause the upgrade to fail as the
next task is using that variable.

Converting it to a fact in step 0 so that we can call it later.

Change-Id: I55058fd6288eec87fd1cd028b4a684b9472496cb
Resolve-Bug: #1799166
This commit is contained in:
Sofer Athlan-Guyot 2018-10-22 10:25:31 +02:00
parent 3b68405f5a
commit 4ad99224bd

@ -253,6 +253,9 @@ outputs:
shell: "httpd -t -D DUMP_VHOSTS | grep -q cinder"
register: cinder_api_apache
ignore_errors: true
- name: Set fact cinder_api_apache (upgrade)
set_fact:
cinder_api_apache: "{{ cinder_api_apache.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-cinder-api is running"
shell: systemctl is-active --quiet openstack-cinder-api
when: cinder_api_enabled|bool
@ -271,7 +274,7 @@ outputs:
when: cinder_api_enabled|bool
- name: Stop and disable cinder_api service
service: name=httpd state=stopped enabled=no
when: cinder_api_apache.rc == 0
when: cinder_api_apache|bool
- when: step|int == 3
block:
- name: remove old cinder cron jobs