Merge "Fix Ansible 2.7 uri module"

This commit is contained in:
Zuul 2019-03-21 19:21:42 +00:00 committed by Gerrit Code Review
commit efae4deec5
2 changed files with 5 additions and 2 deletions

View File

@ -3,4 +3,4 @@
- uri:
method: GET
url: https://example.com
path: /tmp/example.out
dest: /tmp/example.out

View File

@ -30,6 +30,9 @@ class ActionModule(uri.ActionModule):
return paths._fail_module_dict(self._task.action)
if paths._is_localhost_task(self):
paths._fail_if_unsafe(self._task.args['path'])
for arg in ('src', 'dest'):
dest = self._task.args.get(arg)
if dest:
paths._fail_if_unsafe(dest)
return super(ActionModule, self).run(tmp, task_vars)