"module_stderr": "OpenSSH_8.0p1, OpenSSL 1.1.1c 28 May 2019\r\ndebug1: Reading configuration data /QOpenSys/QIBM/ProdData/SC1/OpenSSH/etc/ssh_config\r\ndebug2: resolve_canonicalize:

Issue #154 resolved
Marcelo Avalos created an issue

Hi, trying to run a playbook to deploy an IBM i VM on PowerVC using roles such as deploy_vm_via_powervc and testing with ac-hoc command the error is attached log.txt file.

In summary the error is as follows:
192.168.1.40 | FAILED! => {
"changed": false,
"module_stderr": "OpenSSH_8.0p1, OpenSSL 1.1.1c 28 May 2019\r\ndebug1: Reading configuration data /QOpenSys/QIBM/ProdData/SC1/OpenSSH/etc/ssh_config\r\ndebug2: resolve_canonicalize: hostname 192.168.1.40 is address\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 = 1065\r\ndebug3: mux_client_request_session: session request sent\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 127\r\nShared connection to 192.168.1.40 closed.\r\n",
"module_stdout": "/bin/sh: /QOpenSys/pkgs/bin/python3: No such file or directory\r\n",
"msg": "The module failed to execute correctly, you probably need to set the interpreter.\nSee stdout/stderr for the exact error",
"rc": 127
}

MORE information about the ansible controller such as: version, host and ansible.cfg are as follows

#cat ansible.cfg

[defaults]
remote_user=qsecofr
inventory=/home/QSECOFR/.ansible/collections/ansible_collections/ibm/power_ibmi/playbooks/hosts_ibmi.ini

library=~/.ansible/collections/ansible_collections/ibm/power_ibmi/plugins/modules
action_plugins=~/.ansible/collections/ansible_collections/ibm/power_ibmi/plugins/action
interpreter_python=/QOpenSys/pkgs/bin/python
host_key_checking=false

[all:vars]
ansible_user=qsecofr
ansible_ssh_pass=abc123

#cat hosts_ibmi.ini
[ibmi]
192.168.1.41 ansible_ssh_user=qsecofr ansible_ssh_pass=abc123
[powervc]
192.168.1.40 ansible_ssh_user=root ansible_ssh_pass=xxxxxxxxx
[ibmi:vars]
ansible_python_interpreter="/QOpensys/pkgs/bin/python2"
ansible_ssh_common_args='-o StrictHostKeyChecking=no'
[powervc:vars]
ansible_ssh_common_args='-o StrictHostKeyChecking=no'
ansible_python_interpreter="/QOpensys/pkgs/bin/python2"

Something else, I tried using ansible_python_interpreter="/QOpensys/pkgs/bin/python2" and _ansible_python_interpreter="/QOpensys/pkgs/bin/python3" on host file but the same symptom

#ansible --version
ansible 2.9.9
config file = /home/QSECOFR/.ansible/collections/ansible_collections/ibm/power_ibmi/playbooks/ansible.cfg
configured module search path = ['/HOME/QSECOFR/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /QOpenSys/pkgs/lib/python3.6/site-packages/ansible
executable location = /QOpenSys/pkgs/bin/ansible
python version = 3.6.12 (default, Nov 10 2020, 13:50:57) [GCC 6.3.0]

The controller nodes is on IBM i and the endpoint is a PowerVC on RHEL with Python Python 3.6.8 and 2.7.5 are installed.