1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix first_available_file: support for copy and template actions

This commit is contained in:
James Cammarata 2015-07-08 12:18:59 -04:00
parent ddac6fa9f3
commit 64a1b1e043
3 changed files with 3 additions and 3 deletions

View file

@ -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")

View file

@ -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")

View file

@ -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