Commit 413fb15e by Peter Sankauskas

Conditional Imports should only import the first file in the list, not all of…

Conditional Imports should only import the first file in the list, not all of them. This change stops looping through the vars_files list as soon as a file is found.
parent 4e74ab48
......@@ -232,6 +232,8 @@ class Play(object):
self.vars.update(data)
elif host is not None:
self.playbook.callbacks.on_not_import_for_host(host, filename4)
if found
break
if not found:
raise errors.AnsibleError(
"%s: FATAL, no files matched for vars_files import sequence: %s" % (host, sequence)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment