Below ansible-playbook connectivity works fine for all my servers except
server2. Below command fails.
ansible-playbook -vvvv /opt/test/scripts/Auto/site.yml -i /opt/test/scripts
/Auto/hosts.txt -e "source_host=server2 execmd=echo source_user=user2"
Output:
<server2> (0, '', 'OpenSSH_7.7p1 (CentrifyDC build 5.5.1-395) , OpenSSL
1.0.2o-fips 27 Mar 2018\r\ndebug1: Reading configuration data
/home/user1/.ssh/config\r\ndebug1: Reading configuration data
/etc/centrifydc/ssh/ssh_config\r\ndebug1: /etc/centrifydc/ssh/ssh_config
line 3: Applying options for *\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 = 57768\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 server2 closed.\r\n')
fatal: [server2]: FAILED! => {
"changed": false,
"module_stderr": "OpenSSH_7.7p1 (CentrifyDC build 5.5.1-395) , OpenSSL
1.0.2o-fips 27 Mar 2018\r\ndebug1: Reading configuration data
/home/user1/.ssh/config\r\ndebug1: Reading configuration data
/etc/centrifydc/ssh/ssh_config\r\ndebug1: /etc/centrifydc/ssh/ssh_config
line 3: Applying options for *\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 = 57768\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 2\r\nShared connection to server2 closed.\r\n",
"module_stdout":
"/home/user2/.ansible/tmp/ansible-tmp-1549081965.65-147775141838271/AnsiballZ_setup.py:
line 3: _ANSIBALLZ_WRAPPER: command not
found\r\n/home/user2/.ansible/tmp/ansible-tmp-1549081965.65-147775141838271/AnsiballZ_setup.py:
line 4: syntax error near unexpected token
`('\r\n/home/user2/.ansible/tmp/ansible-tmp-1549081965.65-147775141838271/AnsiballZ_setup.py:
line 4: `def _ansiballz_main():'\r\n",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 2
}
to retry, use: --limit @/opt/test/scripts/Auto/site.retry
PLAY RECAP
*****************************************************************************************************************************************************************************************************************
server2 : ok=0 changed=0 unreachable=0 failed=1
Source Ansible Server details:
[user1@server1: Auto]$ uname -a
Linux server1 3.10.0-957.el7.x86_64 #1 SMP Thu Oct 4 20:48:51 UTC 2018
x86_64 x86_64 x86_64 GNU/Linux
[user1@server1: Auto]$ ansible --version
ansible 2.7.1
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/user1/.ansible/plugins/modules',
u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /bin/ansible
python version = 2.7.5 (default, Sep 12 2018, 05:31:16) [GCC 4.8.5
20150623 (Red Hat 4.8.5-36)]
Ansible Host file details:
tail -f /opt/test/scripts/Auto/hosts.txt
[server2]
server2 ansible_ssh_common_args="-t -o UserKnownHostsFile=/dev/null -o
StrictHostKeyChecking=no -o ControlPersist=30m" ansible_shell_executable=
/bin/bash ansible_shell_type=sh ANSIBLE_HOST_KEY_CHECKING=false
ansible_python_interpreter= ansible_ssh_private_key_file=/opt/test/scripts/
ssh_key/id_rsa USER_RUN=user2
And now the Destination Server details:
user2@server2:~$ uname -a
SunOS server2 5.11 11.3 sun4v sparc sun4v
user2@server2:~$ python --version
Python 2.7.14
Note: I wish to make changes only to my playbook and do not wish to change
anything in ansible.cfg thus other playbooks should not be affected.
Can you please suggest how can I get this to work ?
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/27da2c5e-19a0-4ad8-9226-4ec6e319188f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.