ansible / ansible

Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy and maintain. Automate everything from code deployment to network configuration to cloud management, in a language that approaches plain English, using SSH, with no agents to install on remote systems. https://docs.ansible.com.
https://www.ansible.com/
GNU General Public License v3.0
62.43k stars 23.82k forks source link

interpreter_python setting ignored during interpreter discovery in Ansible core 2.17 #83791

Closed atoom closed 1 month ago

atoom commented 1 month ago

Summary

When upgrading from Ansible 8.x to Ansible 10.x we have run into issues on hosts with multiple Python installations. In order to force the use of system python on all hosts we have set interpreter_python to auto_legacy in ansible.cfg however the "wrong" python is discovered.

After looking at the code for the python discovery implementation (https://github.com/ansible/ansible/blob/devel/lib/ansible/executor/interpreter_discovery.py) and adding some debug lines to see what's going on it seems that the following block is always executed:

version_map = platform_python_map.get(distro.lower().strip()) or platform_python_map.get(family)
if not version_map:
    raise NotImplementedError('unsupported Linux distribution: {0}'.format(distro))

The exception is caught with the following try/catch code:

except NotImplementedError as ex:
    display.vvv(msg=u'Python interpreter discovery fallback ({0})'.format(to_text(ex)), host=host)

And finally the discovery logic ends with:

return found_interpreters[0]

The reason for this seems to be in the following commit: https://github.com/ansible/ansible/commit/5566a655ae9de3343a5c8b2e370cb157c35c52cb where the _INTERPRETER_PYTHON_DISTRO_MAP in lib/ansible/config/base.yml is replaced with test data only.

From the way I see it the NotImplementedError will always be thrown and the rest of the interpreter discovery logic will be skipped and thus any configuration in the interpreter_python will be ignored ?

Issue Type

Bug Report

Component Name

core

Ansible Version

$ ansible --version
ansible [core 2.17.3]
  config file = /home/xxx/.ansible.cfg
  configured module search path = ['/opt/ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/xxx/ansible/10.3.0/lib/python3.10/site-packages/ansible
  ansible collection location = /opt/ansible/collections:/usr/share/ansible/collections
  executable location = /opt/ansible/bin/ansible
  python version = 3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0] (/opt/xxx/ansible/10.3.0/bin/python3)
  jinja version = 3.1.4
  libyaml = True

Configuration

# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
ANSIBLE_HOME(env: ANSIBLE_HOME) = /opt/ansible
CONFIG_FILE() = /home/xxx/.ansible.cfg
DEFAULT_ASK_PASS(/home/xxx/.ansible.cfg) = True
DEFAULT_JINJA2_EXTENSIONS(/home/xxx/.ansible.cfg) = jinja2.ext.do
DEFAULT_REMOTE_USER(/home/xxx/.ansible.cfg) = xxx
DEFAULT_TIMEOUT(/home/xxx/.ansible.cfg) = 30
HOST_KEY_CHECKING(/home/xxx/.ansible.cfg) = False
INTERPRETER_PYTHON(/home/xxx/.ansible.cfg) = auto_legacy

CONNECTION:
==========

paramiko_ssh:
____________
host_key_checking(/home/xxx/.ansible.cfg) = False
remote_user(/home/xxx/.ansible.cfg) = xxx
timeout(/home/xxx/.ansible.cfg) = 30

ssh:
___
host_key_checking(/home/xxx/.ansible.cfg) = False
remote_user(/home/xxx/.ansible.cfg) = xxx
timeout(/home/xxx/.ansible.cfg) = 30

SHELL:
=====

sh:
__
remote_tmp(/home/xxx/.ansible.cfg) = $HOME/.ansible/tmp

OS / Environment

RHEL 9

Steps to Reproduce

ansible -vvvv -i inventories/test -m ping all

Expected Results

Ansible fact discovered_interpreter_python should be set to /usr/bin/python3

Actual Results

ansible [core 2.17.3]
  config file = /home/xxx/.ansible.cfg
  configured module search path = ['/opt/ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/xxx/ansible/10.3.0/lib/python3.10/site-packages/ansible
  ansible collection location = /opt/ansible/collections:/usr/share/ansible/collections
  executable location = /opt/ansible/bin/ansible
  python version = 3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0] (/opt/xxx/ansible/10.3.0/bin/python3)
  jinja version = 3.1.4
  libyaml = True
Using /home/xxx/.ansible.cfg as config file
SSH password:
setting up inventory plugins
Loading collection ansible.builtin from
host_list declined parsing /home/xxx/dev/proj/devexp/playbook-jenkins/inventories/test as it did not pass its verify_file() method
script declined parsing /home/xxx/dev/proj/devexp/playbook-jenkins/inventories/test as it did not pass its verify_file() method
auto declined parsing /home/xxx/dev/proj/devexp/playbook-jenkins/inventories/test as it did not pass its verify_file() method
Parsed /home/xxx/dev/proj/devexp/playbook-jenkins/inventories/test inventory source with ini plugin
Loading callback plugin minimal of type stdout, v2.0 from /opt/xxx/ansible/10.3.0/lib/python3.10/site-packages/ansible/plugins/callback/minimal.py
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
<7072.xxx.net> ESTABLISH SSH CONNECTION FOR USER: xxx
<7072.xxx.net> SSH: EXEC sshpass -d12 ssh -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="xxx"' -o ConnectTimeout=30 -o 'ControlPath="/home/xxx/.ansible/cp/09d221a94c"' 7072.xxx.net '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp `"&& mkdir "` echo $HOME/.ansible/tmp/ansible-tmp-1723631902.3436167-11995-118483913096751 `" && echo ansible-tmp-1723631902.3436167-11995-118483913096751="` echo $HOME/.ansible/tmp/ansible-tmp-1723631902.3436167-11995-118483913096751 `" ) && sleep 0'"'"''
<7072.xxx.net> (0, b'ansible-tmp-1723631902.3436167-11995-118483913096751=/home/xxx/xxx/.ansible/tmp/ansible-tmp-1723631902.3436167-11995-118483913096751\n', b'OpenSSH_8.9p1 Ubuntu-3ubuntu0.10, OpenSSL 3.0.2 15 Mar 2022\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files\r\ndebug1: /etc/ssh/ssh_config line 21: Applying options for *\r\ndebug3: expanded UserKnownHostsFile \'~/.ssh/known_hosts\' -> \'/home/xxx/.ssh/known_hosts\'\r\ndebug3: expanded UserKnownHostsFile \'~/.ssh/known_hosts2\' -> \'/home/xxx/.ssh/known_hosts2\'\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: Control socket "/home/xxx/.ansible/cp/09d221a94c" does not exist\r\ndebug2: resolving "7072.xxx.net" port 22\r\ndebug3: resolve_host: lookup 7072.xxx.net:22\r\ndebug3: ssh_connect_direct: entering\r\ndebug1: Connecting to 7072.xxx.net [10.248.225.66] port 22.\r\ndebug3: set_sock_tos: set socket 3 IP_TOS 0x10\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: fd 3 clearing O_NONBLOCK\r\ndebug1: Connection established.\r\ndebug3: timeout: 29983 ms remain after connect\r\ndebug1: identity file /home/xxx/.ssh/id_rsa type -1\r\ndebug1: identity file /home/xxx/.ssh/id_rsa-cert type -1\r\ndebug1: identity file /home/xxx/.ssh/id_ecdsa type -1\r\ndebug1: identity file /home/xxx/.ssh/id_ecdsa-cert type -1\r\ndebug1: identity file /home/xxx/.ssh/id_ecdsa_sk type -1\r\ndebug1: identity file /home/xxx/.ssh/id_ecdsa_sk-cert type -1\r\ndebug1: identity file /home/xxx/.ssh/id_ed25519 type 3\r\ndebug1: identity file /home/xxx/.ssh/id_ed25519-cert type -1\r\ndebug1: identity file /home/xxx/.ssh/id_ed25519_sk type -1\r\ndebug1: identity file /home/xxx/.ssh/id_ed25519_sk-cert type -1\r\ndebug1: identity file /home/xxx/.ssh/id_xmss type -1\r\ndebug1: identity file /home/xxx/.ssh/id_xmss-cert type -1\r\ndebug1: identity file /home/xxx/.ssh/id_dsa type -1\r\ndebug1: identity file /home/xxx/.ssh/id_dsa-cert type -1\r\ndebug1: Local version string SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.10\r\ndebug1: Remote protocol version 2.0, remote software version OpenSSH_8.7\r\ndebug1: compat_banner: match: OpenSSH_8.7 pat OpenSSH* compat 0x04000000\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: Authenticating to 7072.xxx.net:22 as \'xxx\\\\xxx\'\r\ndebug3: record_hostkey: found key type ED25519 in file /home/xxx/.ssh/known_hosts:236\r\ndebug3: load_hostkeys_file: loaded 1 keys from 7072.xxx.net\r\ndebug1: load_hostkeys: fopen /home/xxx/.ssh/known_hosts2: No such file or directory\r\ndebug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory\r\ndebug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory\r\ndebug3: order_hostkeyalgs: have matching best-preference key type ssh-ed25519-cert-v01@openssh.com, using HostkeyAlgorithms verbatim\r\ndebug3: send packet: type 20\r\ndebug1: SSH2_MSG_KEXINIT sent\r\ndebug3: receive packet: type 20\r\ndebug1: SSH2_MSG_KEXINIT received\r\ndebug2: local client KEXINIT proposal\r\ndebug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,sntrup761x25519-sha512@openssh.com,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,ext-info-c,kex-strict-c-v00@openssh.com\r\ndebug2: host key algorithms: ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,rsa-sha2-512,rsa-sha2-256\r\ndebug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com\r\ndebug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com\r\ndebug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: compression ctos: zlib@openssh.com,zlib,none\r\ndebug2: compression stoc: zlib@openssh.com,zlib,none\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first_kex_follows 0 \r\ndebug2: reserved 0 \r\ndebug2: peer server KEXINIT proposal\r\ndebug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,kex-strict-s-v00@openssh.com\r\ndebug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519\r\ndebug2: ciphers ctos: aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes128-gcm@openssh.com,aes128-ctr\r\ndebug2: ciphers stoc: aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes128-gcm@openssh.com,aes128-ctr\r\ndebug2: MACs ctos: hmac-sha2-256-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha2-256,hmac-sha1,umac-128@openssh.com,hmac-sha2-512\r\ndebug2: MACs stoc: hmac-sha2-256-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha2-256,hmac-sha1,umac-128@openssh.com,hmac-sha2-512\r\ndebug2: compression ctos: none,zlib@openssh.com\r\ndebug2: compression stoc: none,zlib@openssh.com\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first_kex_follows 0 \r\ndebug2: reserved 0 \r\ndebug3: kex_choose_conf: will use strict KEX ordering\r\ndebug1: kex: algorithm: curve25519-sha256\r\ndebug1: kex: host key algorithm: ssh-ed25519\r\ndebug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: zlib@openssh.com\r\ndebug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: zlib@openssh.com\r\ndebug3: send packet: type 30\r\ndebug1: expecting SSH2_MSG_KEX_ECDH_REPLY\r\ndebug3: receive packet: type 31\r\ndebug1: SSH2_MSG_KEX_ECDH_REPLY received\r\ndebug1: Server host key: ssh-ed25519 SHA256:Ststpjrt7qjJ7E5Ksry/BmUyW/qz+HPMwp9+AMRQB8A\r\ndebug3: record_hostkey: found key type ED25519 in file /home/xxx/.ssh/known_hosts:236\r\ndebug3: load_hostkeys_file: loaded 1 keys from 7072.xxx.net\r\ndebug1: load_hostkeys: fopen /home/xxx/.ssh/known_hosts2: No such file or directory\r\ndebug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory\r\ndebug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory\r\ndebug1: Host \'7072.xxx.net\' is known and matches the ED25519 host key.\r\ndebug1: Found key in /home/xxx/.ssh/known_hosts:236\r\ndebug3: send packet: type 21\r\ndebug1: ssh_packet_send2_wrapped: resetting send seqnr 3\r\ndebug2: ssh_set_newkeys: mode 1\r\ndebug1: rekey out after 134217728 blocks\r\ndebug1: SSH2_MSG_NEWKEYS sent\r\ndebug1: expecting SSH2_MSG_NEWKEYS\r\ndebug3: receive packet: type 21\r\ndebug1: ssh_packet_read_poll2: resetting read seqnr 3\r\ndebug1: SSH2_MSG_NEWKEYS received\r\ndebug2: ssh_set_newkeys: mode 0\r\ndebug1: rekey in after 134217728 blocks\r\ndebug1: get_agent_identities: bound agent to hostkey\r\ndebug1: get_agent_identities: agent returned 1 keys\r\ndebug1: Will attempt key: /home/xxx/.ssh/id_ed25519 ED25519 SHA256:7l9ufKkIMU/J3j2zf0wUHaJnTXV5npfIemGcPwsM270 agent\r\ndebug1: Will attempt key: /home/xxx/.ssh/id_rsa \r\ndebug1: Will attempt key: /home/xxx/.ssh/id_ecdsa \r\ndebug1: Will attempt key: /home/xxx/.ssh/id_ecdsa_sk \r\ndebug1: Will attempt key: /home/xxx/.ssh/id_ed25519_sk \r\ndebug1: Will attempt key: /home/xxx/.ssh/id_xmss \r\ndebug1: Will attempt key: /home/xxx/.ssh/id_dsa \r\ndebug2: pubkey_prepare: done\r\ndebug3: send packet: type 5\r\ndebug3: receive packet: type 7\r\ndebug1: SSH2_MSG_EXT_INFO received\r\ndebug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,sk-ssh-ed25519@openssh.com,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,webauthn-sk-ecdsa-sha2-nistp256@openssh.com>\r\ndebug3: receive packet: type 6\r\ndebug2: service_accept: ssh-userauth\r\ndebug1: SSH2_MSG_SERVICE_ACCEPT received\r\ndebug3: send packet: type 50\r\ndebug3: receive packet: type 53\r\ndebug3: input_userauth_banner: entering\r\nAuthorized uses only. All activity may be monitored and reported.\ndebug3: receive packet: type 51\r\ndebug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password\r\ndebug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic,password\r\ndebug3: preferred gssapi-with-mic,publickey,keyboard-interactive,password\r\ndebug3: authmethod_lookup gssapi-with-mic\r\ndebug3: remaining preferred: publickey,keyboard-interactive,password\r\ndebug3: authmethod_is_enabled gssapi-with-mic\r\ndebug1: Next authentication method: gssapi-with-mic\r\ndebug1: No credentials were supplied, or the credentials were unavailable or inaccessible\nNo Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)\n\n\r\ndebug1: No credentials were supplied, or the credentials were unavailable or inaccessible\nNo Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)\n\n\r\ndebug2: we did not send a packet, disable method\r\ndebug3: authmethod_lookup publickey\r\ndebug3: remaining preferred: keyboard-interactive,password\r\ndebug3: authmethod_is_enabled publickey\r\ndebug1: Next authentication method: publickey\r\ndebug1: Offering public key: /home/xxx/.ssh/id_ed25519 ED25519 SHA256:7l9ufKkIMU/J3j2zf0wUHaJnTXV5npfIemGcPwsM270 agent\r\ndebug3: send packet: type 50\r\ndebug2: we sent a publickey packet, wait for reply\r\ndebug3: receive packet: type 51\r\ndebug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password\r\ndebug1: Trying private key: /home/xxx/.ssh/id_rsa\r\ndebug3: no such identity: /home/xxx/.ssh/id_rsa: No such file or directory\r\ndebug1: Trying private key: /home/xxx/.ssh/id_ecdsa\r\ndebug3: no such identity: /home/xxx/.ssh/id_ecdsa: No such file or directory\r\ndebug1: Trying private key: /home/xxx/.ssh/id_ecdsa_sk\r\ndebug3: no such identity: /home/xxx/.ssh/id_ecdsa_sk: No such file or directory\r\ndebug1: Trying private key: /home/xxx/.ssh/id_ed25519_sk\r\ndebug3: no such identity: /home/xxx/.ssh/id_ed25519_sk: No such file or directory\r\ndebug1: Trying private key: /home/xxx/.ssh/id_xmss\r\ndebug3: no such identity: /home/xxx/.ssh/id_xmss: No such file or directory\r\ndebug1: Trying private key: /home/xxx/.ssh/id_dsa\r\ndebug3: no such identity: /home/xxx/.ssh/id_dsa: No such file or directory\r\ndebug2: we did not send a packet, disable method\r\ndebug3: authmethod_lookup password\r\ndebug3: remaining preferred: ,password\r\ndebug3: authmethod_is_enabled password\r\ndebug1: Next authentication method: password\r\ndebug3: send packet: type 50\r\ndebug2: we sent a password packet, wait for reply\r\ndebug3: receive packet: type 52\r\ndebug1: Enabling compression at level 6.\r\nAuthenticated to 7072.xxx.net ([10.248.225.66]:22) using "password".\r\ndebug1: setting up multiplex master socket\r\ndebug3: muxserver_listen: temporary control path /home/xxx/.ansible/cp/09d221a94c.xeniE0yJqultHNvf\r\ndebug2: fd 4 setting O_NONBLOCK\r\ndebug3: fd 4 is O_NONBLOCK\r\ndebug3: fd 4 is O_NONBLOCK\r\ndebug1: channel 0: new [/home/xxx/.ansible/cp/09d221a94c]\r\ndebug3: muxserver_listen: mux listener channel 0 fd 4\r\ndebug2: fd 3 setting TCP_NODELAY\r\ndebug3: set_sock_tos: set socket 3 IP_TOS 0x08\r\ndebug1: control_persist_detach: backgrounding master process\r\ndebug2: control_persist_detach: background process is 11999\r\ndebug2: fd 4 setting O_NONBLOCK\r\ndebug1: forking to background\r\ndebug1: Entering interactive session.\r\ndebug1: pledge: id\r\ndebug2: set_control_persist_exit_time: schedule exit in 60 seconds\r\ndebug1: multiplexing control connection\r\ndebug2: fd 5 setting O_NONBLOCK\r\ndebug3: fd 5 is O_NONBLOCK\r\ndebug1: channel 1: new [mux-control]\r\ndebug3: channel_post_mux_listener: new mux channel 1 fd 5\r\ndebug3: mux_master_read_cb: channel 1: hello sent\r\ndebug2: set_control_persist_exit_time: cancel scheduled exit\r\ndebug3: mux_master_read_cb: channel 1 packet type 0x00000001 len 4\r\ndebug2: mux_master_process_hello: channel 1 client version 4\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_master_read_cb: channel 1 packet type 0x10000004 len 4\r\ndebug2: mux_master_process_alive_check: channel 1: alive check\r\ndebug3: mux_client_request_alive: done pid = 12001\r\ndebug3: mux_client_request_session: session request sent\r\ndebug3: mux_master_read_cb: channel 1 packet type 0x10000002 len 379\r\ndebug2: mux_master_process_new_session: channel 1: request tty 0, X 0, agent 0, subsys 0, term "xterm-256color", cmd "/bin/sh -c \'( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp `"&& mkdir "` echo $HOME/.ansible/tmp/ansible-tmp-1723631902.3436167-11995-118483913096751 `" && echo ansible-tmp-1723631902.3436167-11995-118483913096751="` echo $HOME/.ansible/tmp/ansible-tmp-1723631902.3436167-11995-118483913096751 `" ) && sleep 0\'", env 1\r\ndebug3: mux_master_process_new_session: got fds stdin 6, stdout 7, stderr 8\r\ndebug1: channel 2: new [client-session]\r\ndebug2: mux_master_process_new_session: channel_new: 2 linked to control channel 1\r\ndebug2: channel 2: send open\r\ndebug3: send packet: type 90\r\ndebug3: receive packet: type 80\r\ndebug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0\r\ndebug3: client_input_hostkeys: received RSA key SHA256:HmHlya+UhsYoEIbJeygA7C5kWY3xVRk6giR4aa0TKnM\r\ndebug3: client_input_hostkeys: received ECDSA key SHA256:N70quns/U5LzTmS4I3f/Poi8coNnqPUtFH9VCOuEBP8\r\ndebug3: client_input_hostkeys: received ED25519 key SHA256:Ststpjrt7qjJ7E5Ksry/BmUyW/qz+HPMwp9+AMRQB8A\r\ndebug1: client_input_hostkeys: searching /home/xxx/.ssh/known_hosts for 7072.xxx.net / (none)\r\ndebug3: hostkeys_foreach: reading file "/home/xxx/.ssh/known_hosts"\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:223\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:224\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:225\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:226\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:227\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:228\r\ndebug3: hostkeys_find: found ssh-ed25519 key at /home/xxx/.ssh/known_hosts:236\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:239\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:241\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:242\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:243\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:244\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:245\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:246\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:247\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:248\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:260\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:261\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:277\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:278\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:281\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:282\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:283\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:284\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:285\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:303\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:304\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:307\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:308\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:309\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:310\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:311\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:312\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:313\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:363\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:364\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:365\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:368\r\ndebug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/xxx/.ssh/known_hosts:369\r\ndebug1: client_input_hostkeys: searching /home/xxx/.ssh/known_hosts2 for 7072.xxx.net / (none)\r\ndebug1: client_input_hostkeys: hostkeys file /home/xxx/.ssh/known_hosts2 does not exist\r\ndebug3: client_input_hostkeys: 3 server keys: 2 new, 18446744073709551615 retained, 2 incomplete match. 0 to remove\r\ndebug1: client_input_hostkeys: host key found matching a different name/address, skipping UserKnownHostsFile update\r\ndebug3: receive packet: type 91\r\ndebug2: channel_input_open_confirmation: channel 2: callback start\r\ndebug2: client_session2_setup: id 2\r\ndebug1: Sending environment.\r\ndebug1: channel 2: setting env LANG = "C.UTF-8"\r\ndebug2: channel 2: request env confirm 0\r\ndebug3: send packet: type 98\r\ndebug1: Sending command: /bin/sh -c \'( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp `"&& mkdir "` echo $HOME/.ansible/tmp/ansible-tmp-1723631902.3436167-11995-118483913096751 `" && echo ansible-tmp-1723631902.3436167-11995-118483913096751="` echo $HOME/.ansible/tmp/ansible-tmp-1723631902.3436167-11995-118483913096751 `" ) && sleep 0\'\r\ndebug2: channel 2: request exec confirm 1\r\ndebug3: send packet: type 98\r\ndebug3: mux_session_confirm: sending success reply\r\ndebug2: channel_input_open_confirmation: channel 2: callback done\r\ndebug2: channel 2: open confirm rwindow 0 rmax 32768\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug2: channel 2: rcvd adjust 2097152\r\ndebug3: receive packet: type 99\r\ndebug2: channel_input_status_confirm: type 99 id 2\r\ndebug2: exec request accepted on channel 2\r\ndebug3: receive packet: type 96\r\ndebug2: channel 2: rcvd eof\r\ndebug2: channel 2: output open -> drain\r\ndebug2: channel 2: obuf empty\r\ndebug2: chan_shutdown_write: channel 2: (i0 o1 sock -1 wfd 7 efd 8 [write])\r\ndebug2: channel 2: output drain -> closed\r\ndebug3: receive packet: type 98\r\ndebug1: client_input_channel_req: channel 2 rtype exit-status reply 0\r\ndebug3: mux_exit_message: channel 2: exit message, exitval 0\r\ndebug3: receive packet: type 98\r\ndebug1: client_input_channel_req: channel 2 rtype eow@openssh.com reply 0\r\ndebug2: channel 2: rcvd eow\r\ndebug2: chan_shutdown_read: channel 2: (i0 o3 sock -1 wfd 6 efd 8 [write])\r\ndebug2: channel 2: input open -> closed\r\ndebug3: receive packet: type 97\r\ndebug2: channel 2: rcvd close\r\ndebug3: channel 2: will not send data after close\r\ndebug2: channel 2: send close\r\ndebug3: send packet: type 97\r\ndebug2: channel 2: is dead\r\ndebug2: channel 2: gc: notify user\r\ndebug3: mux_master_session_cleanup_cb: entering for channel 2\r\ndebug2: channel 1: rcvd close\r\ndebug2: channel 1: output open -> drain\r\ndebug2: chan_shutdown_read: channel 1: (i0 o1 sock 5 wfd 5 efd -1 [closed])\r\ndebug2: channel 1: input open -> closed\r\ndebug2: channel 2: gc: user detached\r\ndebug2: channel 2: is dead\r\ndebug2: channel 2: garbage collecting\r\ndebug1: channel 2: free: client-session, nchannels 3\r\ndebug3: channel 2: status: The following connections are open:\r\n  #1 mux-control (t16 nr0 i3/0 o1/16 e[closed]/0 fd 5/5/-1 sock 5 cc -1 io 0x03/0x00)\r\n  #2 client-session (t4 r0 i3/0 o3/0 e[write]/0 fd -1/-1/8 sock -1 cc -1 io 0x00/0x00)\r\n\r\ndebug2: channel 1: obuf empty\r\ndebug2: chan_shutdown_write: channel 1: (i3 o1 sock 5 wfd 5 efd -1 [closed])\r\ndebug2: channel 1: output drain -> closed\r\ndebug2: channel 1: is dead (local)\r\ndebug2: channel 1: gc: notify user\r\ndebug3: mux_master_control_cleanup_cb: entering for channel 1\r\ndebug2: channel 1: gc: user detached\r\ndebug2: channel 1: is dead (local)\r\ndebug2: channel 1: garbage collecting\r\ndebug1: channel 1: free: mux-control, nchannels 2\r\ndebug3: channel 1: status: The following connections are open:\r\n  #1 mux-control (t16 nr0 i3/0 o3/0 e[closed]/0 fd 5/5/-1 sock 5 cc -1 io 0x00/0x03)\r\n\r\ndebug2: set_control_persist_exit_time: schedule exit in 60 seconds\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<7072.xxx.net> Attempting python interpreter discovery
<7072.xxx.net> ESTABLISH SSH CONNECTION FOR USER: xxx
<7072.xxx.net> SSH: EXEC sshpass -d12 ssh -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="xxx"' -o ConnectTimeout=30 -o 'ControlPath="/home/xxx/.ansible/cp/09d221a94c"' 7072.xxx.net '/bin/sh -c '"'"'echo PLATFORM; uname; echo FOUND; command -v '"'"'"'"'"'"'"'"'python3.12'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.11'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.10'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.9'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.8'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.7'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'/usr/bin/python3'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3'"'"'"'"'"'"'"'"'; echo ENDFOUND && sleep 0'"'"''
<7072.xxx.net> (0, b'PLATFORM\nLinux\nFOUND\n/usr/bin/python3.11\n/usr/bin/python3.9\n/usr/bin/python3\n/usr/bin/python3\nENDFOUND\n', b"OpenSSH_8.9p1 Ubuntu-3ubuntu0.10, OpenSSL 3.0.2 15 Mar 2022\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files\r\ndebug1: /etc/ssh/ssh_config line 21: Applying options for *\r\ndebug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/xxx/.ssh/known_hosts'\r\ndebug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/xxx/.ssh/known_hosts2'\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 12001\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n")
<7072.xxx.net> ESTABLISH SSH CONNECTION FOR USER: xxx
<7072.xxx.net> SSH: EXEC sshpass -d12 ssh -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="xxx"' -o ConnectTimeout=30 -o 'ControlPath="/home/xxx/.ansible/cp/09d221a94c"' 7072.xxx.net '/bin/sh -c '"'"'/usr/bin/python3.11 && sleep 0'"'"''
<7072.xxx.net> (0, b'{"platform_dist_result": [], "osrelease_content": "NAME=\\"Red Hat Enterprise Linux\\"\\nVERSION=\\"9.4 (Plow)\\"\\nID=\\"rhel\\"\\nID_LIKE=\\"fedora\\"\\nVERSION_ID=\\"9.4\\"\\nPLATFORM_ID=\\"platform:el9\\"\\nPRETTY_NAME=\\"Red Hat Enterprise Linux 9.4 (Plow)\\"\\nANSI_COLOR=\\"0;31\\"\\nLOGO=\\"fedora-logo-icon\\"\\nCPE_NAME=\\"cpe:/o:redhat:enterprise_linux:9::baseos\\"\\nHOME_URL=\\"https://www.redhat.com/\\"\\nDOCUMENTATION_URL=\\"https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9\\"\\nBUG_REPORT_URL=\\"https://bugzilla.redhat.com/\\"\\n\\nREDHAT_BUGZILLA_PRODUCT=\\"Red Hat Enterprise Linux 9\\"\\nREDHAT_BUGZILLA_PRODUCT_VERSION=9.4\\nREDHAT_SUPPORT_PRODUCT=\\"Red Hat Enterprise Linux\\"\\nREDHAT_SUPPORT_PRODUCT_VERSION=\\"9.4\\"\\n"}\n', b"OpenSSH_8.9p1 Ubuntu-3ubuntu0.10, OpenSSL 3.0.2 15 Mar 2022\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files\r\ndebug1: /etc/ssh/ssh_config line 21: Applying options for *\r\ndebug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/xxx/.ssh/known_hosts'\r\ndebug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/xxx/.ssh/known_hosts2'\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 12001\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n")
<7072.xxx.net> Python interpreter discovery fallback (unsupported Linux distribution: rhel)
Using module file /opt/xxx/ansible/10.3.0/lib/python3.10/site-packages/ansible/modules/ping.py
<7072.xxx.net> PUT /opt/ansible/tmp/ansible-local-11977unwr8j3c/tmpe67xb6ud TO /home/xxx/xxx/.ansible/tmp/ansible-tmp-1723631902.3436167-11995-118483913096751/AnsiballZ_ping.py
<7072.xxx.net> SSH: EXEC sshpass -d12 sftp -o BatchMode=no -b - -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="xxx"' -o ConnectTimeout=30 -o 'ControlPath="/home/xxx/.ansible/cp/09d221a94c"' '[7072.xxx.net]'
<7072.xxx.net> (0, b'sftp> put /opt/ansible/tmp/ansible-local-11977unwr8j3c/tmpe67xb6ud /home/xxx/xxx/.ansible/tmp/ansible-tmp-1723631902.3436167-11995-118483913096751/AnsiballZ_ping.py\n', b'OpenSSH_8.9p1 Ubuntu-3ubuntu0.10, OpenSSL 3.0.2 15 Mar 2022\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files\r\ndebug1: /etc/ssh/ssh_config line 21: Applying options for *\r\ndebug3: expanded UserKnownHostsFile \'~/.ssh/known_hosts\' -> \'/home/xxx/.ssh/known_hosts\'\r\ndebug3: expanded UserKnownHostsFile \'~/.ssh/known_hosts2\' -> \'/home/xxx/.ssh/known_hosts2\'\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 12001\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug2: Remote version: 3\r\ndebug2: Server supports extension "posix-rename@openssh.com" revision 1\r\ndebug2: Server supports extension "statvfs@openssh.com" revision 2\r\ndebug2: Server supports extension "fstatvfs@openssh.com" revision 2\r\ndebug2: Server supports extension "hardlink@openssh.com" revision 1\r\ndebug2: Server supports extension "fsync@openssh.com" revision 1\r\ndebug2: Server supports extension "lsetstat@openssh.com" revision 1\r\ndebug2: Server supports extension "limits@openssh.com" revision 1\r\ndebug2: Server supports extension "expand-path@openssh.com" revision 1\r\ndebug3: Sent message limits@openssh.com I:1\r\ndebug3: Received limits reply T:201 I:1\r\ndebug1: Using server download size 261120\r\ndebug1: Using server upload size 261120\r\ndebug1: Server handle limit 1019; using 64\r\ndebug2: Sending SSH2_FXP_REALPATH "."\r\ndebug3: Sent message fd 3 T:16 I:2\r\ndebug3: SSH2_FXP_REALPATH . -> /home/xxx/xxx\r\ndebug3: Looking up /opt/ansible/tmp/ansible-local-11977unwr8j3c/tmpe67xb6ud\r\ndebug2: Sending SSH2_FXP_STAT "/home/xxx/xxx/.ansible/tmp/ansible-tmp-1723631902.3436167-11995-118483913096751/AnsiballZ_ping.py"\r\ndebug3: Sent message fd 3 T:17 I:3\r\ndebug1: stat remote: No such file or directory\r\ndebug2: do_upload: upload local "/opt/ansible/tmp/ansible-local-11977unwr8j3c/tmpe67xb6ud" to remote "/home/xxx/xxx/.ansible/tmp/ansible-tmp-1723631902.3436167-11995-118483913096751/AnsiballZ_ping.py"\r\ndebug2: Sending SSH2_FXP_OPEN "/home/xxx/xxx/.ansible/tmp/ansible-tmp-1723631902.3436167-11995-118483913096751/AnsiballZ_ping.py"\r\ndebug3: Sent dest message SSH2_FXP_OPEN I:4 P:/home/xxx/xxx/.ansible/tmp/ansible-tmp-1723631902.3436167-11995-118483913096751/AnsiballZ_ping.py M:0x001a\r\ndebug3: Sent message SSH2_FXP_WRITE I:6 O:0 S:114602\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 6 114602 bytes at 0\r\ndebug3: Sent message SSH2_FXP_CLOSE I:5\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<7072.xxx.net> ESTABLISH SSH CONNECTION FOR USER: xxx
<7072.xxx.net> SSH: EXEC sshpass -d12 ssh -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="xxx"' -o ConnectTimeout=30 -o 'ControlPath="/home/xxx/.ansible/cp/09d221a94c"' 7072.xxx.net '/bin/sh -c '"'"'chmod u+x /home/xxx/xxx/.ansible/tmp/ansible-tmp-1723631902.3436167-11995-118483913096751/ /home/xxx/xxx/.ansible/tmp/ansible-tmp-1723631902.3436167-11995-118483913096751/AnsiballZ_ping.py && sleep 0'"'"''
<7072.xxx.net> (0, b'', b"OpenSSH_8.9p1 Ubuntu-3ubuntu0.10, OpenSSL 3.0.2 15 Mar 2022\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files\r\ndebug1: /etc/ssh/ssh_config line 21: Applying options for *\r\ndebug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/xxx/.ssh/known_hosts'\r\ndebug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/xxx/.ssh/known_hosts2'\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 12001\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n")
<7072.xxx.net> ESTABLISH SSH CONNECTION FOR USER: xxx
<7072.xxx.net> SSH: EXEC sshpass -d12 ssh -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="xxx"' -o ConnectTimeout=30 -o 'ControlPath="/home/xxx/.ansible/cp/09d221a94c"' -tt 7072.xxx.net '/bin/sh -c '"'"'/usr/bin/python3.11 /home/xxx/xxx/.ansible/tmp/ansible-tmp-1723631902.3436167-11995-118483913096751/AnsiballZ_ping.py && sleep 0'"'"''
<7072.xxx.net> (0, b'\r\n{"ping": "pong", "invocation": {"module_args": {"data": "pong"}}}\r\n', b"OpenSSH_8.9p1 Ubuntu-3ubuntu0.10, OpenSSL 3.0.2 15 Mar 2022\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files\r\ndebug1: /etc/ssh/ssh_config line 21: Applying options for *\r\ndebug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/xxx/.ssh/known_hosts'\r\ndebug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/xxx/.ssh/known_hosts2'\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 12001\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to 7072.xxx.net closed.\r\n")
<7072.xxx.net> ESTABLISH SSH CONNECTION FOR USER: xxx
<7072.xxx.net> SSH: EXEC sshpass -d12 ssh -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="xxx"' -o ConnectTimeout=30 -o 'ControlPath="/home/xxx/.ansible/cp/09d221a94c"' 7072.xxx.net '/bin/sh -c '"'"'rm -f -r /home/xxx/xxx/.ansible/tmp/ansible-tmp-1723631902.3436167-11995-118483913096751/ > /dev/null 2>&1 && sleep 0'"'"''
<7072.xxx.net> (0, b'', b"OpenSSH_8.9p1 Ubuntu-3ubuntu0.10, OpenSSL 3.0.2 15 Mar 2022\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files\r\ndebug1: /etc/ssh/ssh_config line 21: Applying options for *\r\ndebug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/xxx/.ssh/known_hosts'\r\ndebug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/xxx/.ssh/known_hosts2'\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 12001\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n")
[WARNING]: Platform linux on host 7072.xxx.net is using the discovered Python interpreter at /usr/bin/python3.11, but future installation of another Python interpreter could
change the meaning of that path. See https://docs.ansible.com/ansible-core/2.17/reference_appendices/interpreter_discovery.html for more information.
7072.xxx.net | SUCCESS => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python3.11"
    },
    "changed": false,
    "invocation": {
        "module_args": {
            "data": "pong"
        }
    },
    "ping": "pong"
}

Code of Conduct

ansibot commented 1 month ago

Files identified in the description:

None

If these files are incorrect, please update the component name section of the description or use the component bot command.

sivel commented 1 month ago

Duplicate of https://github.com/ansible/ansible/issues/77840

atoom commented 1 month ago

@sivel Thanks for taking a look at this issue!

I agree that there is overlap with issue #77840 but I would argue that this problem is a regression bug introduced in Ansible core 2.17.x via the commit I referenced in the issue description.

From my understanding of the code starting from 2.17.x the lookup in platform_python_map will always be a miss and the NotImplementedError will always be thrown resulting in much of the implementation for interpreter_python setting is ignored and basically every ansible execution that requires interpreter discovery will print the interpreter discovery warning.

Can you take a second look and see if I misunderstand something ?

bcoca commented 1 month ago

closing in favor of #77840