Always evaluate step first in conditional
If we use variables defined in later step in conditional before checking which step are we on we will fail. Resolves: rhbz#1535457 Closes-Bug: #1743764 Change-Id: Ic21f6eb5c4101f230fa894cd0829a11e2f0ef39b
This commit is contained in:
@@ -172,8 +172,12 @@ outputs:
|
||||
register: neutron_ovs_agent_enabled
|
||||
- name: "PreUpgrade step0,validation: Check service neutron-openvswitch-agent is running"
|
||||
shell: /usr/bin/systemctl show 'neutron-openvswitch-agent' --property ActiveState | grep '\bactive\b'
|
||||
when: (neutron_ovs_agent_enabled.rc == 0) and (step|int == 0)
|
||||
when:
|
||||
- step|int == 0
|
||||
- neutron_ovs_agent_enabled.rc == 0
|
||||
tags: validation
|
||||
- name: Stop neutron_ovs_agent service
|
||||
when: (neutron_ovs_agent_enabled.rc == 0) and (step|int == 1)
|
||||
when:
|
||||
- step|int == 1
|
||||
- neutron_ovs_agent_enabled.rc == 0
|
||||
service: name=neutron-openvswitch-agent state=stopped
|
||||
|
||||
Reference in New Issue
Block a user