From 52ec39c73fdee69a44a4b336f5d47137b15ee393 Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Thu, 23 Feb 2017 17:48:07 -0500 Subject: [PATCH] Fix synchronize action issue with mode We incorrectly used the 'pull' argument from synchronize, the correct setting is 'mode'. Change-Id: I3cf53aa35f255a3cab68271d73d0414cd83b70f4 Signed-off-by: Paul Belanger --- zuul/ansible/action/synchronize.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zuul/ansible/action/synchronize.py b/zuul/ansible/action/synchronize.py index 88ca13a185..ff514ac734 100644 --- a/zuul/ansible/action/synchronize.py +++ b/zuul/ansible/action/synchronize.py @@ -24,13 +24,13 @@ class ActionModule(synchronize.ActionModule): source = self._task.args.get('src', None) dest = self._task.args.get('dest', None) - pull = self._task.args.get('pull', False) + mode = self._task.args.get('mode', 'push') if '--safe-links' not in self._task.args['rsync_opts']: self._task.args['rsync_opts'].append('--safe-links') - if not pull and not paths._is_safe_path(source): + if mode == 'push' and not paths._is_safe_path(source): return paths._fail_dict(source, prefix='Syncing files from') - if pull and not paths._is_safe_path(dest): + if mode == 'pull' and not paths._is_safe_path(dest): return paths._fail_dict(dest, prefix='Syncing files to') return super(ActionModule, self).run(tmp, task_vars)