From 7bc64581d7f3b2217e24b1db6d432c7a2fc4cd41 Mon Sep 17 00:00:00 2001 From: Skylar Saveland Date: Sun, 17 Nov 2013 21:26:17 -0800 Subject: [PATCH] KeyError: 'delegate_to' no more --- lib/ansible/runner/action_plugins/synchronize.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/runner/action_plugins/synchronize.py b/lib/ansible/runner/action_plugins/synchronize.py index 865fcbb2b2..0004136dab 100644 --- a/lib/ansible/runner/action_plugins/synchronize.py +++ b/lib/ansible/runner/action_plugins/synchronize.py @@ -36,14 +36,14 @@ class ActionModule(object): def setup(self, module_name, inject): ''' Always default to localhost as delegate if None defined ''' - if inject['delegate_to'] is None: + if inject.get('delegate_to') is None: inject['delegate_to'] = '127.0.0.1' inject['ansible_connection'] = 'local' # If sudo is active, disable from the connection set self.sudo to True. if self.runner.sudo: self.runner.sudo = False - def run(self, conn, tmp, module_name, module_args, + def run(self, conn, tmp, module_name, module_args, inject, complex_args=None, **kwargs): ''' generates params and passes them on to the rsync module '''