mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
updates the code path for network modules (#21193)
* replaces persistent connection digest with _create_control_path() * adds _ansible_socket to _legal_inputs in basic.py * adds connection_user to play_context * maps remote_user to connection_user when connection is local * maps ansible_socket in task_vars to module_args _ansible_socket if exists
This commit is contained in:
parent
25cb281b9b
commit
138051540e
4 changed files with 15 additions and 10 deletions
|
@ -168,6 +168,7 @@ class PlayContext(Base):
|
|||
_timeout = FieldAttribute(isa='int', default=C.DEFAULT_TIMEOUT)
|
||||
_shell = FieldAttribute(isa='string')
|
||||
_network_os = FieldAttribute(isa='string')
|
||||
_connection_user = FieldAttribute(isa='string')
|
||||
_ssh_args = FieldAttribute(isa='string', default=C.ANSIBLE_SSH_ARGS)
|
||||
_ssh_common_args = FieldAttribute(isa='string')
|
||||
_sftp_extra_args = FieldAttribute(isa='string')
|
||||
|
@ -442,6 +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.remote_user = pwd.getpwuid(os.getuid()).pw_name
|
||||
|
||||
# set no_log to default if it was not previouslly set
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue