Commit 7bc64581 by Skylar Saveland

KeyError: 'delegate_to' no more

parent b7971a42
...@@ -36,7 +36,7 @@ class ActionModule(object): ...@@ -36,7 +36,7 @@ class ActionModule(object):
def setup(self, module_name, inject): def setup(self, module_name, inject):
''' Always default to localhost as delegate if None defined ''' ''' 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['delegate_to'] = '127.0.0.1'
inject['ansible_connection'] = 'local' inject['ansible_connection'] = 'local'
# If sudo is active, disable from the connection set self.sudo to True. # If sudo is active, disable from the connection set self.sudo to True.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment