mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Fixes for synchronize with delegate_to
This commit is contained in:
parent
3939348286
commit
d1933accc3
2 changed files with 30 additions and 14 deletions
|
@ -134,6 +134,18 @@ SU_PROMPT_LOCALIZATIONS = [
|
|||
'密碼',
|
||||
]
|
||||
|
||||
TASK_ATTRIBUTE_OVERRIDES = (
|
||||
'become',
|
||||
'become_user',
|
||||
'become_pass',
|
||||
'become_method',
|
||||
'connection',
|
||||
'delegate_to',
|
||||
'no_log',
|
||||
'remote_user',
|
||||
)
|
||||
|
||||
|
||||
class PlayContext(Base):
|
||||
|
||||
'''
|
||||
|
@ -285,7 +297,7 @@ class PlayContext(Base):
|
|||
|
||||
# loop through a subset of attributes on the task object and set
|
||||
# connection fields based on their values
|
||||
for attr in ('connection', 'remote_user', 'become', 'become_user', 'become_pass', 'become_method', 'no_log'):
|
||||
for attr in TASK_ATTRIBUTE_OVERRIDES:
|
||||
if hasattr(task, attr):
|
||||
attr_val = getattr(task, attr)
|
||||
if attr_val is not None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue