fall through file source list: first_available_file support

add first_available_file look up to _execute_template and _execute_copy
to runner.

add this data to playbook handler so it can be included into module_vars
This commit is contained in:
Seth Vidal 2012-04-27 16:43:55 -04:00
commit 72fd971822
2 changed files with 32 additions and 2 deletions

View file

@ -390,8 +390,10 @@ class PlayBook(object):
module_args = tokens[1]
# include task specific vars
module_vars = task.get('vars')
module_vars = task.get('vars', {})
if 'first_available_file' in task:
module_vars['first_available_file'] = task.get('first_available_file')
# tasks can be direct (run on all nodes matching
# the pattern) or conditional, where they ran
# as the result of a change handler on a subset