Fix first_available_file: support for copy and template actions

pull/11534/head
James Cammarata 9 years ago
parent ddac6fa9f3
commit 64a1b1e043

@ -43,7 +43,7 @@ class ActionModule(ActionBase):
dest = self._task.args.get('dest', None)
raw = boolean(self._task.args.get('raw', 'no'))
force = boolean(self._task.args.get('force', 'yes'))
faf = task_vars.get('first_available_file', None)
faf = self._task.first_available_file
if (source is None and content is None and faf is None) or dest is None:
return dict(failed=True, msg="src (or content) and dest are required")

@ -55,7 +55,7 @@ class ActionModule(ActionBase):
source = self._task.args.get('src', None)
dest = self._task.args.get('dest', None)
faf = task_vars.get('first_available_file', None)
faf = self._task.first_available_file
if (source is None and faf is not None) or dest is None:
return dict(failed=True, msg="src and dest are required")

@ -44,7 +44,7 @@
- name: check what python version ansible is running on
command: python -c 'import distutils.sysconfig ; print(distutils.sysconfig.get_python_version())'
register: pyver
delegate_to: localhost
#delegate_to: localhost
- name: copy known good into place
copy: src=foo.txt dest={{output_dir}}/foo.txt

Loading…
Cancel
Save