summaryrefslogtreecommitdiff
path: root/zuul/ansible
diff options
context:
space:
mode:
authorJames E. Blair <jeblair@redhat.com>2019-03-20 15:44:59 -0700
committerJames E. Blair <jeblair@redhat.com>2019-03-21 09:17:09 -0700
commitaff5bdd8b1a58d241fad49aa69f0900d25209410 (patch)
treefa17c7854009f6895708eb661296355bf4a9a351 /zuul/ansible
parent01a8eb80f02c73f401c84648984d42290f807cb5 (diff)
downloadzuul-aff5bdd8b1a58d241fad49aa69f0900d25209410.tar.gz
Fix Ansible 2.7 uri module
The 'path' argument doesn't exist, but 'src' and 'dest' do. Currently this fails due to a KeyError if the module is used. Also, fix the test case to use the 'dest' attribute which is what all versions of the module actually use, rather than 'path'. Change-Id: I09ec78ec16beb455338cf311fc4a9d23442071ab
Diffstat (limited to 'zuul/ansible')
-rw-r--r--zuul/ansible/base/action/uri.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/zuul/ansible/base/action/uri.py b/zuul/ansible/base/action/uri.py
index 2030554a8..bc64657ed 100644
--- a/zuul/ansible/base/action/uri.py
+++ b/zuul/ansible/base/action/uri.py
@@ -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)