Merge "config: Always add step conditional first for upgrade_tasks" into stable/pike
This commit is contained in:
commit
c9b8029339
|
@ -120,16 +120,16 @@ class TestConfig(base.TestCase):
|
|||
'service':
|
||||
'name=fake state=stopped',
|
||||
'tags': 'step1',
|
||||
'when': ['existingcondition',
|
||||
'step|int == 1']},
|
||||
'when': ['step|int == 1',
|
||||
'existingcondition']},
|
||||
{'name': 'Stop nova-'
|
||||
'compute service',
|
||||
'service':
|
||||
'name=openstack-nova-'
|
||||
'compute state=stopped',
|
||||
'tags': 'step1',
|
||||
'when': ['existing',
|
||||
'list', 'step|int == 1']}]}
|
||||
'when': ['step|int == 1',
|
||||
'existing', 'list']}]}
|
||||
mock_get_role_data.return_value = fake_role
|
||||
|
||||
for role in fake_role:
|
||||
|
|
|
@ -69,7 +69,7 @@ class Config(object):
|
|||
# Skip to the next task,
|
||||
# there is an existing 'step|int == N'
|
||||
continue
|
||||
whenexpr.append("step|int == %s" % step)
|
||||
whenexpr.insert(0, "step|int == %s" % step)
|
||||
task['when'] = whenexpr
|
||||
|
||||
def _write_playbook_get_tasks(self, tasks, role, filepath):
|
||||
|
|
Loading…
Reference in New Issue