mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
Fix legacy su handling (bad conditional would not fire at the right time)
This commit is contained in:
committed by
Brian Coca
parent
06617548ed
commit
aa9941aaf7
@@ -418,7 +418,7 @@ class PlayContext(Base):
|
||||
if sudo_pass_name in variables:
|
||||
setattr(new_info, 'become_pass', variables[sudo_pass_name])
|
||||
break
|
||||
if new_info.become_method == 'sudo':
|
||||
elif new_info.become_method == 'su':
|
||||
for su_pass_name in MAGIC_VARIABLE_MAPPING.get('su_pass'):
|
||||
if su_pass_name in variables:
|
||||
setattr(new_info, 'become_pass', variables[su_pass_name])
|
||||
|
||||
Reference in New Issue
Block a user