1
0
Fork 0
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:
Toshio Kuratomi 2017-07-23 11:52:11 -07:00 committed by Brian Coca
parent 06617548ed
commit aa9941aaf7

View file

@ -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])