Correct tags option position in ansible hook
I made a mistake with the argument ordering, these need to go before the playbook name Change-Id: If7d2dc9f9a09d1c9feb78c3a8cbb2980c3e647f4
This commit is contained in:
parent
e8e15adba9
commit
0a93377447
|
@ -78,8 +78,8 @@ def main(argv=sys.argv):
|
|||
'@%s' % vars_filename
|
||||
]
|
||||
if tags:
|
||||
cmd.insert(-1, '--tags')
|
||||
cmd.insert(-1, tags)
|
||||
cmd.insert(3, '--tags')
|
||||
cmd.insert(4, tags)
|
||||
log.debug('Running %s' % (' '.join(cmd),))
|
||||
try:
|
||||
subproc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
|
||||
|
|
|
@ -103,11 +103,12 @@ class HookAnsibleTest(common.RunScriptTest):
|
|||
expected_args = [
|
||||
self.fake_tool_path,
|
||||
'-i',
|
||||
'localhost,',
|
||||
ansible_playbook,
|
||||
'--extra-vars']
|
||||
'localhost,']
|
||||
if options:
|
||||
expected_args += options
|
||||
expected_args += [
|
||||
ansible_playbook,
|
||||
'--extra-vars']
|
||||
expected_args.append('@%s' % vars_filename)
|
||||
self.assertEqual(expected_args, state['args'])
|
||||
|
||||
|
|
Loading…
Reference in New Issue