Merge pull request #4937 from skyl/synchronize-keyerror
KeyError: 'delegate_to' lookup in sync module needs to be checked to see if defined for ad hoc
This commit is contained in:
commit
f18acee779
1 changed files with 2 additions and 2 deletions
|
@ -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 '''
|
||||
|
|
Loading…
Reference in a new issue