KeyError: 'delegate_to' no more
This commit is contained in:
parent
b7971a426c
commit
7bc64581d7
1 changed files with 2 additions and 2 deletions
|
@ -36,7 +36,7 @@ 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.
|
||||
|
|
Loading…
Reference in a new issue