mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix legacy su handling (bad conditional would not fire at the right time)
This commit is contained in:
parent
06617548ed
commit
aa9941aaf7
1 changed files with 1 additions and 1 deletions
|
@ -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])
|
||||
|
|
Loading…
Reference in a new issue