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

fix play_context connection_user attribute (#21640)

The connection user needs to be set from the original play_context and
not the copy.  This fixes that problem
This commit is contained in:
Peter Sprygada 2017-02-19 17:11:48 -05:00 committed by GitHub
parent 9b166f6f29
commit c06b10eedd

View file

@ -443,7 +443,7 @@ class PlayContext(Base):
# additionally, we need to do this check after final connection has been
# correctly set above ...
if new_info.connection == 'local':
new_info.connection_user = new_info.remote_user
new_info.connection_user = self.remote_user
new_info.remote_user = pwd.getpwuid(os.getuid()).pw_name
# set no_log to default if it was not previouslly set