1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

make delegate_to localhost act like local_action

This commit is contained in:
Jonathan Palley 2012-09-26 02:57:00 +08:00
parent f8a9541405
commit 620accf117

View file

@ -62,6 +62,11 @@ class Task(object):
self.action = ds.get('local_action', '')
self.delegate_to = '127.0.0.1'
self.transport = 'local'
# delegate_to: localhost should use local transport
elif (ds.get('delegate_to', None) in ['127.0.0.1', 'localhost']):
self.action = ds.get('action', '')
self.delegate_to = '127.0.0.1'
self.transport = 'local'
else:
self.action = ds.get('action', '')
self.delegate_to = ds.get('delegate_to', None)