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.93k stars 23.9k forks source link

pkgng appears to fail when running from devel branch. #23446

Closed Infiniverse closed 4 years ago

Infiniverse commented 7 years ago
ISSUE TYPE
COMPONENT NAME

modules/packaging/os/pkgng.py

ANSIBLE VERSION
unnamed-84:ansible-plays joe$ ansible --version
ansible 2.4.0 (devel 753d30b64d) last updated 2017/04/09 23:36:13 (GMT +100)
  config file = 
  configured module search path = [u'/Users/joe/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/joe/ansible/lib/ansible
  executable location = /Users/joe/ansible/bin/ansible
  python version = 2.7.12 (default, Jun 29 2016, 14:05:02) [GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)]
CONFIGURATION

Default config - no changes

OS / ENVIRONMENT

Host: Darwin unnamed-84.karthauser.co.uk 15.6.0 Darwin Kernel Version 15.6.0: Thu Jun 23 18:25:34 PDT 2016; root:xnu-3248.60.10~1/RELEASE_X86_64 x86_64 Managing: FreeBSD 11.0-RELEASE-p1 FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu Sep 29 01:43:23 UTC 2016 root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64

SUMMARY

pkgng appears not to work when running against the version in the git repository, and throws an error instead of running. I'm not sure why - the version I installed using pip (which is also 2.4.0, but I don't know what SHA) works fine.

STEPS TO REPRODUCE

Inventory:

[test]
test

[test:vars]
ansible_ssh_user=joe
ansible_connection=ssh
ansible_ssh_host=10.17.0.2
ansible_python_interpreter=/usr/local/bin/python2.7

Playbook:

---
- name: test if we can install a package
  hosts: test
  tasks:
  - pkgng: name=curl state=present
EXPECTED RESULTS

Using the devel version installed by pip everything works fine, and the pkg is installed:

unnamed-84:neo4j-spatial-ours joe$ ansible --version
ansible 2.4.0
  config file = 
  configured module search path = Default w/o overrides
  python version = 2.7.12 (default, Jun 29 2016, 14:05:02) [GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)]

unnamed-84:ansible-plays joe$ ansible-playbook -vvvv -i xxx xxx-playbook.yml 
No config file found; using defaults
 [WARNING]: Found both group and host with same name: test

Loading callback plugin default of type stdout, v2.0 from /usr/local/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc

PLAYBOOK: xxx-playbook.yml ********************************************************************************************************************************************************
1 plays in xxx-playbook.yml

PLAY [test if we can install a package] *******************************************************************************************************************************************

TASK [Gathering Facts] ************************************************************************************************************************************************************
Using module file /usr/local/lib/python2.7/site-packages/ansible/modules/system/setup.py
<10.17.0.2> ESTABLISH SSH CONNECTION FOR USER: joe
<10.17.0.2> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=joe -o ConnectTimeout=10 -o ControlPath=/Users/joe/.ansible/cp/9511c3b4be 10.17.0.2 '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<10.17.0.2> (0, '/home/joe\n', 'OpenSSH_6.9p1, LibreSSL 2.1.8\r\ndebug1: Reading configuration data /Users/joe/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 20: Applying options for *\r\ndebug1: /etc/ssh/ssh_config line 53: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: Control socket "/Users/joe/.ansible/cp/9511c3b4be" does not exist\r\ndebug2: ssh_connect: needpriv 0\r\ndebug1: Connecting to 10.17.0.2 [10.17.0.2] port 22.\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: fd 3 clearing O_NONBLOCK\r\ndebug1: Connection established.\r\ndebug3: timeout: 10000 ms remain after connect\r\ndebug1: identity file /Users/joe/.ssh/id_rsa type 1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /Users/joe/.ssh/id_rsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /Users/joe/.ssh/id_dsa type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /Users/joe/.ssh/id_dsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /Users/joe/.ssh/id_ecdsa type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /Users/joe/.ssh/id_ecdsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /Users/joe/.ssh/id_ed25519 type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /Users/joe/.ssh/id_ed25519-cert type -1\r\ndebug1: Enabling compatibility mode for protocol 2.0\r\ndebug1: Local version string SSH-2.0-OpenSSH_6.9\r\ndebug1: Remote protocol version 2.0, remote software version OpenSSH_7.2 FreeBSD-20160310\r\ndebug1: match: OpenSSH_7.2 FreeBSD-20160310 pat OpenSSH* compat 0x04000000\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: Authenticating to 10.17.0.2:22 as \'joe\'\r\ndebug3: hostkeys_foreach: reading file "/Users/joe/.ssh/known_hosts"\r\ndebug3: record_hostkey: found key type ECDSA in file /Users/joe/.ssh/known_hosts:290\r\ndebug3: load_hostkeys: loaded 1 keys from 10.17.0.2\r\ndebug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521\r\ndebug1: SSH2_MSG_KEXINIT sent\r\ndebug1: SSH2_MSG_KEXINIT received\r\ndebug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1\r\ndebug2: kex_parse_kexinit: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-ed25519,ssh-rsa,ssh-dss\r\ndebug2: kex_parse_kexinit: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se\r\ndebug2: kex_parse_kexinit: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se\r\ndebug2: kex_parse_kexinit: 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,hmac-md5-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96\r\ndebug2: kex_parse_kexinit: 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,hmac-md5-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96\r\ndebug2: kex_parse_kexinit: zlib@openssh.com,zlib,none\r\ndebug2: kex_parse_kexinit: zlib@openssh.com,zlib,none\r\ndebug2: kex_parse_kexinit: \r\ndebug2: kex_parse_kexinit: \r\ndebug2: kex_parse_kexinit: first_kex_follows 0 \r\ndebug2: kex_parse_kexinit: reserved 0 \r\ndebug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1\r\ndebug2: kex_parse_kexinit: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519\r\ndebug2: kex_parse_kexinit: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc\r\ndebug2: kex_parse_kexinit: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc\r\ndebug2: kex_parse_kexinit: 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: kex_parse_kexinit: 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: kex_parse_kexinit: none,zlib@openssh.com\r\ndebug2: kex_parse_kexinit: none,zlib@openssh.com\r\ndebug2: kex_parse_kexinit: \r\ndebug2: kex_parse_kexinit: \r\ndebug2: kex_parse_kexinit: first_kex_follows 0 \r\ndebug2: kex_parse_kexinit: reserved 0 \r\ndebug1: kex: server->client chacha20-poly1305@openssh.com <implicit> zlib@openssh.com\r\ndebug1: kex: client->server chacha20-poly1305@openssh.com <implicit> zlib@openssh.com\r\ndebug1: expecting SSH2_MSG_KEX_ECDH_REPLY\r\ndebug1: Server host key: ecdsa-sha2-nistp256 SHA256:PBy5pJ17qfkwj8ZgZVD4AGBKqxuj62eR6yh9J3nccCU\r\ndebug3: hostkeys_foreach: reading file "/Users/joe/.ssh/known_hosts"\r\ndebug3: record_hostkey: found key type ECDSA in file /Users/joe/.ssh/known_hosts:290\r\ndebug3: load_hostkeys: loaded 1 keys from 10.17.0.2\r\ndebug1: Host \'10.17.0.2\' is known and matches the ECDSA host key.\r\ndebug1: Found key in /Users/joe/.ssh/known_hosts:290\r\ndebug2: set_newkeys: mode 1\r\ndebug1: SSH2_MSG_NEWKEYS sent\r\ndebug1: expecting SSH2_MSG_NEWKEYS\r\ndebug2: set_newkeys: mode 0\r\ndebug1: SSH2_MSG_NEWKEYS received\r\ndebug1: SSH2_MSG_SERVICE_REQUEST sent\r\ndebug2: service_accept: ssh-userauth\r\ndebug1: SSH2_MSG_SERVICE_ACCEPT received\r\ndebug2: key: /Users/joe/.ssh/id_rsa (0x7ff6726001a0),\r\ndebug2: key: /Users/joe/.ssh/id_o2oatc-equalexperts-usbeta (0x7ff672509300),\r\ndebug2: key: /Users/joe/.ssh/joe-deneb (0x7ff672509550),\r\ndebug2: key: /Users/joe/.ssh/id_dsa (0x0),\r\ndebug2: key: /Users/joe/.ssh/id_ecdsa (0x0),\r\ndebug2: key: /Users/joe/.ssh/id_ed25519 (0x0),\r\ndebug1: Authentications that can continue: publickey,keyboard-interactive\r\ndebug3: start over, passed a different list publickey,keyboard-interactive\r\ndebug3: preferred gssapi-with-mic,gssapi-keyex,hostbased,publickey\r\ndebug3: authmethod_lookup publickey\r\ndebug3: remaining preferred: ,gssapi-keyex,hostbased,publickey\r\ndebug3: authmethod_is_enabled publickey\r\ndebug1: Next authentication method: publickey\r\ndebug1: Offering RSA public key: /Users/joe/.ssh/id_rsa\r\ndebug3: send_pubkey_test\r\ndebug2: we sent a publickey packet, wait for reply\r\ndebug1: Server accepts key: pkalg ssh-rsa blen 277\r\ndebug2: input_userauth_pk_ok: fp SHA256:Z8OMi3dkpojsVA9GJOinaUZe/Rqt6Hej50+ZvUphISs\r\ndebug3: sign_and_send_pubkey: RSA SHA256:Z8OMi3dkpojsVA9GJOinaUZe/Rqt6Hej50+ZvUphISs\r\ndebug1: Enabling compression at level 6.\r\ndebug1: Authentication succeeded (publickey).\r\nAuthenticated to 10.17.0.2 ([10.17.0.2]:22).\r\ndebug1: setting up multiplex master socket\r\ndebug3: muxserver_listen: temporary control path /Users/joe/.ansible/cp/9511c3b4be.bBGFNiiqbNydzoDf\r\ndebug2: fd 5 setting O_NONBLOCK\r\ndebug3: fd 5 is O_NONBLOCK\r\ndebug3: fd 5 is O_NONBLOCK\r\ndebug1: channel 0: new [/Users/joe/.ansible/cp/9511c3b4be]\r\ndebug3: muxserver_listen: mux listener channel 0 fd 5\r\ndebug2: fd 3 setting TCP_NODELAY\r\ndebug3: ssh_packet_set_tos: set IP_TOS 0x08\r\ndebug1: control_persist_detach: backgrounding master process\r\ndebug2: control_persist_detach: background process is 95215\r\ndebug2: fd 5 setting O_NONBLOCK\r\ndebug1: forking to background\r\ndebug1: Entering interactive session.\r\ndebug2: set_control_persist_exit_time: schedule exit in 60 seconds\r\ndebug1: multiplexing control connection\r\ndebug3: fd 6 is O_NONBLOCK\r\ndebug3: fd 6 is O_NONBLOCK\r\ndebug1: channel 1: new [mux-control]\r\ndebug3: channel_post_mux_listener: new mux channel 1 fd 6\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: process_mux_master_hello: channel 1 slave 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: process_mux_alive_check: channel 1: alive check\r\ndebug3: mux_client_request_alive: done pid = 95217\r\ndebug3: mux_client_request_session: session request sent\r\ndebug3: mux_master_read_cb: channel 1 packet type 0x10000002 len 100\r\ndebug2: process_mux_new_session: channel 1: request tty 0, X 0, agent 1, subsys 0, term "xterm-256color", cmd "/bin/sh -c \'echo ~ && sleep 0\'", env 1\r\ndebug3: process_mux_new_session: got fds stdin 7, stdout 8, stderr 9\r\ndebug2: fd 8 setting O_NONBLOCK\r\ndebug2: fd 9 setting O_NONBLOCK\r\ndebug1: channel 2: new [client-session]\r\ndebug2: process_mux_new_session: channel_new: 2 linked to control channel 1\r\ndebug2: channel 2: send open\r\ndebug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0\r\ndebug2: callback start\r\ndebug1: Requesting authentication agent forwarding.\r\ndebug2: channel 2: request auth-agent-req@openssh.com confirm 0\r\ndebug2: client_session2_setup: id 2\r\ndebug1: Sending environment.\r\ndebug1: Sending env LANG = en_GB.UTF-8\r\ndebug2: channel 2: request env confirm 0\r\ndebug1: Sending command: /bin/sh -c \'echo ~ && sleep 0\'\r\ndebug2: channel 2: request exec confirm 1\r\ndebug3: mux_session_confirm: sending success reply\r\ndebug2: 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\ndebug2: channel_input_status_confirm: type 99 id 2\r\ndebug2: exec request accepted on channel 2\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\ndebug1: client_input_channel_req: channel 2 rtype eow@openssh.com reply 0\r\ndebug2: channel 2: rcvd eow\r\ndebug2: channel 2: close_read\r\ndebug2: channel 2: input open -> closed\r\ndebug2: channel 2: rcvd eof\r\ndebug2: channel 2: output open -> drain\r\ndebug2: channel 2: obuf empty\r\ndebug2: channel 2: close_write\r\ndebug2: channel 2: output drain -> closed\r\ndebug2: channel 2: rcvd close\r\ndebug3: channel 2: will not send data after close\r\ndebug2: channel 2: send close\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: channel 1: close_read\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  #2 client-session (t4 r0 i3/0 o3/0 fd -1/-1 cc -1)\r\n\r\ndebug2: channel 1: obuf empty\r\ndebug2: channel 1: close_write\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\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\ndebug2: set_control_persist_exit_time: schedule exit in 60 seconds\r\n')
<10.17.0.2> ESTABLISH SSH CONNECTION FOR USER: joe
<10.17.0.2> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=joe -o ConnectTimeout=10 -o ControlPath=/Users/joe/.ansible/cp/9511c3b4be 10.17.0.2 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/joe/.ansible/tmp/ansible-tmp-1491778713.19-124073297865315 `" && echo ansible-tmp-1491778713.19-124073297865315="` echo /home/joe/.ansible/tmp/ansible-tmp-1491778713.19-124073297865315 `" ) && sleep 0'"'"''
<10.17.0.2> (0, 'ansible-tmp-1491778713.19-124073297865315=/home/joe/.ansible/tmp/ansible-tmp-1491778713.19-124073297865315\n', 'OpenSSH_6.9p1, LibreSSL 2.1.8\r\ndebug1: Reading configuration data /Users/joe/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 20: Applying options for *\r\ndebug1: /etc/ssh/ssh_config line 53: 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 = 95217\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')
<10.17.0.2> PUT /var/folders/p4/rjqvjlbx2rz1cs9x74f0tb6m0000gp/T/tmp8dSA3A TO /home/joe/.ansible/tmp/ansible-tmp-1491778713.19-124073297865315/setup.py
<10.17.0.2> SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=joe -o ConnectTimeout=10 -o ControlPath=/Users/joe/.ansible/cp/9511c3b4be '[10.17.0.2]'
<10.17.0.2> (0, 'sftp> put /var/folders/p4/rjqvjlbx2rz1cs9x74f0tb6m0000gp/T/tmp8dSA3A /home/joe/.ansible/tmp/ansible-tmp-1491778713.19-124073297865315/setup.py\n', 'OpenSSH_6.9p1, LibreSSL 2.1.8\r\ndebug1: Reading configuration data /Users/joe/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 20: Applying options for *\r\ndebug1: /etc/ssh/ssh_config line 53: 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 = 95217\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\ndebug3: Sent message fd 8 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -> /usr/home/joe size 0\r\ndebug3: Looking up /var/folders/p4/rjqvjlbx2rz1cs9x74f0tb6m0000gp/T/tmp8dSA3A\r\ndebug3: Sent message fd 8 T:17 I:2\r\ndebug3: Received stat reply T:101 I:2\r\ndebug1: Couldn\'t stat remote file: No such file or directory\r\ndebug3: Sent message SSH2_FXP_OPEN I:3 P:/home/joe/.ansible/tmp/ansible-tmp-1491778713.19-124073297865315/setup.py\r\ndebug3: Sent message SSH2_FXP_WRITE I:4 O:0 S:32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 4 32768 bytes at 0\r\ndebug3: Sent message SSH2_FXP_WRITE I:5 O:32768 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:6 O:65536 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:7 O:98304 S:5256\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 5 32768 bytes at 32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 6 32768 bytes at 65536\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 7 5256 bytes at 98304\r\ndebug3: Sent message SSH2_FXP_CLOSE I:4\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')
<10.17.0.2> ESTABLISH SSH CONNECTION FOR USER: joe
<10.17.0.2> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=joe -o ConnectTimeout=10 -o ControlPath=/Users/joe/.ansible/cp/9511c3b4be 10.17.0.2 '/bin/sh -c '"'"'chmod u+x /home/joe/.ansible/tmp/ansible-tmp-1491778713.19-124073297865315/ /home/joe/.ansible/tmp/ansible-tmp-1491778713.19-124073297865315/setup.py && sleep 0'"'"''
<10.17.0.2> (0, '', 'OpenSSH_6.9p1, LibreSSL 2.1.8\r\ndebug1: Reading configuration data /Users/joe/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 20: Applying options for *\r\ndebug1: /etc/ssh/ssh_config line 53: 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 = 95217\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')
<10.17.0.2> ESTABLISH SSH CONNECTION FOR USER: joe
<10.17.0.2> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=joe -o ConnectTimeout=10 -o ControlPath=/Users/joe/.ansible/cp/9511c3b4be -tt 10.17.0.2 '/bin/sh -c '"'"'/usr/local/bin/python2.7 /home/joe/.ansible/tmp/ansible-tmp-1491778713.19-124073297865315/setup.py; rm -rf "/home/joe/.ansible/tmp/ansible-tmp-1491778713.19-124073297865315/" > /dev/null 2>&1 && sleep 0'"'"''
<10.17.0.2> (0, '\r\n{"invocation": {"module_args": {"filter": "*", "gather_subset": ["all"], "fact_path": "/etc/ansible/facts.d", "gather_timeout": 10}}, "changed": false, "ansible_facts": {"ansible_product_serial": "NA", "ansible_form_factor": "NA", "ansible_product_version": "NA", "ansible_fips": false, "ansible_service_mgr": "bsdinit", "ansible_swaptotal_mb": 2048, "module_setup": true, "ansible_userspace_bits": "64", "ansible_architecture": "amd64", "ansible_distribution_version": "11.0", "ansible_domain": "", "ansible_date_time": {"weekday_number": "1", "iso8601_basic_short": "20170410T005832", "tz": "BST", "weeknumber": "15", "hour": "00", "year": "2017", "minute": "58", "tz_offset": "+0100", "month": "04", "epoch": "1491782312", "iso8601_micro": "2017-04-09T23:58:32.567539Z", "weekday": "Monday", "time": "00:58:32", "date": "2017-04-10", "iso8601": "2017-04-09T23:58:32Z", "day": "10", "iso8601_basic": "20170410T005832567036", "second": "32"}, "ansible_ssh_host_key_ed25519_public": "AAAAC3NzaC1lZDI1NTE5AAAAIJjMiJPP4VD9Dc3y7ovUoq6nmJjR1lt6CC3K91Pfg95X", "ansible_virtualization_role": "", "ansible_em1": {"status": "active", "macaddress": "08:00:27:1a:99:e7", "media": "Ethernet", "metric": "0", "media_options": ["full-duplex"], "mtu": "1500", "flags": ["UP", "BROADCAST", "RUNNING", "SIMPLEX", "MULTICAST"], "ipv4": [{"broadcast": "10.17.0.255", "netmask": "255.255.255.0", "network": "10.17.0.0", "address": "10.17.0.2"}], "ipv6": [], "device": "em1", "media_type": "1000baseT", "media_select": "autoselect", "type": "ether", "options": ["PERFORMNUD", "IFDISABLED", "AUTO_LINKLOCAL"]}, "ansible_dns": {"nameservers": ["217.169.20.20", "217.169.20.21"], "search": ["karthauser.co.uk"]}, "ansible_effective_group_id": 0, "ansible_bios_version": "NA", "ansible_processor": ["Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz (2802.42-MHz K8-class CPU)"], "ansible_virtualization_type": "", "ansible_default_ipv6": {}, "ansible_memtotal_mb": 3942, "ansible_ssh_host_key_ecdsa_public": "AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBI5CPa5abJiDtzJaU8CgJazkVIUORGzXUfA/XpSa/o0HWwq/q1OVv6stit0K0B+jP1fBOPTakQXOC/wGjTrfl/8=", "ansible_real_user_id": 1001, "ansible_default_ipv4": {"status": "active", "macaddress": "08:00:27:ca:2b:91", "network": "10.0.2.0", "media": "Ethernet", "metric": "0", "media_options": ["full-duplex"], "mtu": "1500", "broadcast": "10.0.2.255", "interface": "em0", "netmask": "255.255.255.0", "flags": ["UP", "BROADCAST", "RUNNING", "SIMPLEX", "MULTICAST"], "gateway": "10.0.2.2", "address": "10.0.2.15", "device": "em0", "media_type": "1000baseT", "media_select": "autoselect", "type": "ether", "options": ["PERFORMNUD", "IFDISABLED", "AUTO_LINKLOCAL"]}, "ansible_swapfree_mb": 2048, "ansible_gather_subset": ["hardware", "network", "virtual"], "ansible_distribution_release": "11.0-RELEASE-p1", "ansible_system_vendor": "NA", "ansible_apparmor": {"status": "disabled"}, "ansible_effective_user_id": 1001, "ansible_mounts": [{"size_total": null, "mount": "none", "size_available": null, "fstype": "swap", "device": "/dev/ada0p2", "options": "sw"}], "ansible_selinux": false, "ansible_os_family": "FreeBSD", "ansible_em0": {"status": "active", "macaddress": "08:00:27:ca:2b:91", "media": "Ethernet", "metric": "0", "media_options": ["full-duplex"], "mtu": "1500", "flags": ["UP", "BROADCAST", "RUNNING", "SIMPLEX", "MULTICAST"], "ipv4": [{"broadcast": "10.0.2.255", "netmask": "255.255.255.0", "network": "10.0.2.0", "address": "10.0.2.15"}, {"broadcast": "192.168.1.255", "netmask": "255.255.255.0", "network": "192.168.1.0", "address": "192.168.1.101"}], "ipv6": [], "device": "em0", "media_type": "1000baseT", "media_select": "autoselect", "type": "ether", "options": ["PERFORMNUD", "IFDISABLED", "AUTO_LINKLOCAL"]}, "ansible_product_uuid": "NA", "ansible_product_name": "NA", "ansible_pkg_mgr": "pkgng", "ansible_memfree_mb": 192, "ansible_devices": {"ada0": []}, "ansible_user_uid": 1001, "ansible_user_id": "joe", "ansible_distribution": "FreeBSD", "ansible_env": {"TERM": "xterm-256color", "SHELL": "/bin/sh", "MAIL": "/var/mail/joe", "SSH_TTY": "/dev/pts/0", "SSH_AUTH_SOCK": "/tmp/ssh-vOvfFi584L/agent.73471", "SSH_CLIENT": "10.17.0.1 57859 22", "PWD": "/usr/home/joe", "LOGNAME": "joe", "USER": "joe", "BLOCKSIZE": "K", "PATH": "/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/joe/bin", "SSH_CONNECTION": "10.17.0.1 57859 10.17.0.2 22", "HOME": "/home/joe"}, "ansible_distribution_major_version": "11", "ansible_user_dir": "/home/joe", "ansible_processor_count": "1", "ansible_hostname": "", "ansible_lo0": {"macaddress": "unknown", "metric": "0", "mtu": "16384", "flags": ["UP", "LOOPBACK", "RUNNING", "MULTICAST"], "ipv4": [{"broadcast": "127.255.255.255", "netmask": "255.0.0.0", "network": "127.0.0.0", "address": "127.0.0.1"}], "ipv6": [{"prefix": "128", "address": "::1"}, {"scope": "0x3", "prefix": "64", "address": "fe80::1%lo0"}], "device": "lo0", "type": "loopback", "options": ["PERFORMNUD", "AUTO_LINKLOCAL"]}, "ansible_real_group_id": 0, "ansible_bios_date": "NA", "ansible_all_ipv6_addresses": [], "ansible_interfaces": ["lo0", "em1", "em0"], "ansible_machine": "amd64", "ansible_ssh_host_key_rsa_public": "AAAAB3NzaC1yc2EAAAADAQABAAABAQCbWNk1RVLVzSwI3dpYVDsIcGmuW9/Xy81dwKZnuTViNF+JoBD+hjG/23rOYfXhE+AQ+ouD9nZVxceORRfg8V7Mte/X7+G2um2iPUM7zsLcpq+6fuC89bXxsNljTKa1/dI4ZzaUyBVE0AbSUojX0E4J57B4cf2CiIA7/A6wKVQp76oziX78FLiO8EInvPbqAMpdgJ0IL3goskxIgkgWQmGTjBpp7hZgv8VTXk/5j74dxvgTlm6duQpUEb7QPI8iJGJOq0Rcqf10rYiVteFplh8WiOcu7iH0k/FED9cTlba/gFqFyZvuIkP8MfA2v4aH0tCxVassutiyGle2qwL7p5Hb", "ansible_user_gecos": "User &", "ansible_python": {"executable": "/usr/local/bin/python2.7", "version": {"micro": 13, "major": 2, "releaselevel": "final", "serial": 0, "minor": 7}, "type": "CPython", "has_sslcontext": true, "version_info": [2, 7, 13, "final", 0]}, "ansible_kernel": "11.0-RELEASE-p1", "ansible_fqdn": "", "ansible_user_gid": 0, "ansible_nodename": "", "ansible_system": "FreeBSD", "ansible_user_shell": "/bin/sh", "ansible_all_ipv4_addresses": ["10.0.2.15", "192.168.1.101", "10.17.0.2"], "ansible_python_version": "2.7.13"}}\r\n', 'OpenSSH_6.9p1, LibreSSL 2.1.8\r\ndebug1: Reading configuration data /Users/joe/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 20: Applying options for *\r\ndebug1: /etc/ssh/ssh_config line 53: 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 = 95217\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 10.17.0.2 closed.\r\n')
ok: [test]
META: ran handlers

TASK [pkgng] **********************************************************************************************************************************************************************
task path: /Users/joe/Documents/TrueSpeed/repositories/true-services-dev/ansible-plays/xxx-playbook.yml:5
Using module file /usr/local/lib/python2.7/site-packages/ansible/modules/packaging/os/pkgng.py
<10.17.0.2> ESTABLISH SSH CONNECTION FOR USER: joe
<10.17.0.2> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=joe -o ConnectTimeout=10 -o ControlPath=/Users/joe/.ansible/cp/9511c3b4be 10.17.0.2 '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<10.17.0.2> (0, '/home/joe\n', 'OpenSSH_6.9p1, LibreSSL 2.1.8\r\ndebug1: Reading configuration data /Users/joe/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 20: Applying options for *\r\ndebug1: /etc/ssh/ssh_config line 53: 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 = 95217\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')
<10.17.0.2> ESTABLISH SSH CONNECTION FOR USER: joe
<10.17.0.2> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=joe -o ConnectTimeout=10 -o ControlPath=/Users/joe/.ansible/cp/9511c3b4be 10.17.0.2 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/joe/.ansible/tmp/ansible-tmp-1491778714.59-101475601967891 `" && echo ansible-tmp-1491778714.59-101475601967891="` echo /home/joe/.ansible/tmp/ansible-tmp-1491778714.59-101475601967891 `" ) && sleep 0'"'"''
<10.17.0.2> (0, 'ansible-tmp-1491778714.59-101475601967891=/home/joe/.ansible/tmp/ansible-tmp-1491778714.59-101475601967891\n', 'OpenSSH_6.9p1, LibreSSL 2.1.8\r\ndebug1: Reading configuration data /Users/joe/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 20: Applying options for *\r\ndebug1: /etc/ssh/ssh_config line 53: 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 = 95217\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')
<10.17.0.2> PUT /var/folders/p4/rjqvjlbx2rz1cs9x74f0tb6m0000gp/T/tmpFy13Kl TO /home/joe/.ansible/tmp/ansible-tmp-1491778714.59-101475601967891/pkgng.py
<10.17.0.2> SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=joe -o ConnectTimeout=10 -o ControlPath=/Users/joe/.ansible/cp/9511c3b4be '[10.17.0.2]'
<10.17.0.2> (0, 'sftp> put /var/folders/p4/rjqvjlbx2rz1cs9x74f0tb6m0000gp/T/tmpFy13Kl /home/joe/.ansible/tmp/ansible-tmp-1491778714.59-101475601967891/pkgng.py\n', 'OpenSSH_6.9p1, LibreSSL 2.1.8\r\ndebug1: Reading configuration data /Users/joe/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 20: Applying options for *\r\ndebug1: /etc/ssh/ssh_config line 53: 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 = 95217\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\ndebug3: Sent message fd 8 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -> /usr/home/joe size 0\r\ndebug3: Looking up /var/folders/p4/rjqvjlbx2rz1cs9x74f0tb6m0000gp/T/tmpFy13Kl\r\ndebug3: Sent message fd 8 T:17 I:2\r\ndebug3: Received stat reply T:101 I:2\r\ndebug1: Couldn\'t stat remote file: No such file or directory\r\ndebug3: Sent message SSH2_FXP_OPEN I:3 P:/home/joe/.ansible/tmp/ansible-tmp-1491778714.59-101475601967891/pkgng.py\r\ndebug3: Sent message SSH2_FXP_WRITE I:4 O:0 S:32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 4 32768 bytes at 0\r\ndebug3: Sent message SSH2_FXP_WRITE I:5 O:32768 S:26522\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 5 26522 bytes at 32768\r\ndebug3: Sent message SSH2_FXP_CLOSE I:4\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')
<10.17.0.2> ESTABLISH SSH CONNECTION FOR USER: joe
<10.17.0.2> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=joe -o ConnectTimeout=10 -o ControlPath=/Users/joe/.ansible/cp/9511c3b4be 10.17.0.2 '/bin/sh -c '"'"'chmod u+x /home/joe/.ansible/tmp/ansible-tmp-1491778714.59-101475601967891/ /home/joe/.ansible/tmp/ansible-tmp-1491778714.59-101475601967891/pkgng.py && sleep 0'"'"''
<10.17.0.2> (0, '', 'OpenSSH_6.9p1, LibreSSL 2.1.8\r\ndebug1: Reading configuration data /Users/joe/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 20: Applying options for *\r\ndebug1: /etc/ssh/ssh_config line 53: 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 = 95217\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')
<10.17.0.2> ESTABLISH SSH CONNECTION FOR USER: joe
<10.17.0.2> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=joe -o ConnectTimeout=10 -o ControlPath=/Users/joe/.ansible/cp/9511c3b4be -tt 10.17.0.2 '/bin/sh -c '"'"'/usr/local/bin/python2.7 /home/joe/.ansible/tmp/ansible-tmp-1491778714.59-101475601967891/pkgng.py; rm -rf "/home/joe/.ansible/tmp/ansible-tmp-1491778714.59-101475601967891/" > /dev/null 2>&1 && sleep 0'"'"''
<10.17.0.2> (0, '\r\n{"msg": "Could not update catalogue", "failed": true, "invocation": {"module_args": {"autoremove": false, "name": ["curl"], "cached": false, "pkgsite": "", "state": "present", "rootdir": "", "chroot": "", "annotation": ""}}}\r\n', 'OpenSSH_6.9p1, LibreSSL 2.1.8\r\ndebug1: Reading configuration data /Users/joe/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 20: Applying options for *\r\ndebug1: /etc/ssh/ssh_config line 53: 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 = 95217\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 10.17.0.2 closed.\r\n')
fatal: [test]: FAILED! => {
    "changed": false, 
    "failed": true, 
    "invocation": {
        "module_args": {
            "annotation": "", 
            "autoremove": false, 
            "cached": false, 
            "chroot": "", 
            "name": [
                "curl"
            ], 
            "pkgsite": "", 
            "rootdir": "", 
            "state": "present"
        }
    }, 
    "msg": "Could not update catalogue"
}
    to retry, use: --limit @/Users/joe/Documents/TrueSpeed/repositories/true-services-dev/ansible-plays/xxx-playbook.retry

PLAY RECAP ************************************************************************************************************************************************************************
test                       : ok=1    changed=0    unreachable=0    failed=1   
ACTUAL RESULTS

What happens, is that instead of installing the package we get an error:

fatal: [test]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Shared connection to 10.17.0.2 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_8XAuhu/ansible_module_pkgng.py\", line 328, in <module>\r\n    main()        \r\n  File \"/tmp/ansible_8XAuhu/ansible_module_pkgng.py\", line 307, in main\r\n    _changed, _msg = install_packages(module, pkgng_path, pkgs, p[\"cached\"], p[\"pkgsite\"], dir_arg)\r\n  File \"/tmp/ansible_8XAuhu/ansible_module_pkgng.py\", line 156, in install_packages\r\n    old_pkgng = pkgng_older_than(module, pkgng_path, [1, 1, 4])\r\n  File \"/tmp/ansible_8XAuhu/ansible_module_pkgng.py\", line 116, in pkgng_older_than\r\n    while compare_version[i] == version[i]:\r\nTypeError: 'itertools.imap' object has no attribute '__getitem__'\r\n", "msg": "MODULE FAILURE", "rc": 0}
unnamed-84:ansible-plays joe$ ansible-playbook -vvvv -i xxx xxx-playbook.yml 
No config file found; using defaults
 [WARNING]: Found both group and host with same name: test

Loading callback plugin default of type stdout, v2.0 from /Users/joe/Documents/TrueSpeed/repositories/ansible/lib/ansible/plugins/callback/__init__.pyc

PLAYBOOK: xxx-playbook.yml ********************************************************************************************************************************************************
1 plays in xxx-playbook.yml

PLAY [test if we can install a package] *******************************************************************************************************************************************

TASK [Gathering Facts] ************************************************************************************************************************************************************
Using module file /Users/joe/Documents/TrueSpeed/repositories/ansible/lib/ansible/modules/system/setup.py
<10.17.0.2> ESTABLISH SSH CONNECTION FOR USER: joe
<10.17.0.2> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=joe -o ConnectTimeout=10 -o ControlPath=/Users/joe/.ansible/cp/9511c3b4be 10.17.0.2 '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<10.17.0.2> (0, '/home/joe\n', 'OpenSSH_6.9p1, LibreSSL 2.1.8\r\ndebug1: Reading configuration data /Users/joe/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 20: Applying options for *\r\ndebug1: /etc/ssh/ssh_config line 53: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: Control socket "/Users/joe/.ansible/cp/9511c3b4be" does not exist\r\ndebug2: ssh_connect: needpriv 0\r\ndebug1: Connecting to 10.17.0.2 [10.17.0.2] port 22.\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: fd 3 clearing O_NONBLOCK\r\ndebug1: Connection established.\r\ndebug3: timeout: 10000 ms remain after connect\r\ndebug1: identity file /Users/joe/.ssh/id_rsa type 1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /Users/joe/.ssh/id_rsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /Users/joe/.ssh/id_dsa type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /Users/joe/.ssh/id_dsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /Users/joe/.ssh/id_ecdsa type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /Users/joe/.ssh/id_ecdsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /Users/joe/.ssh/id_ed25519 type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /Users/joe/.ssh/id_ed25519-cert type -1\r\ndebug1: Enabling compatibility mode for protocol 2.0\r\ndebug1: Local version string SSH-2.0-OpenSSH_6.9\r\ndebug1: Remote protocol version 2.0, remote software version OpenSSH_7.2 FreeBSD-20160310\r\ndebug1: match: OpenSSH_7.2 FreeBSD-20160310 pat OpenSSH* compat 0x04000000\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: Authenticating to 10.17.0.2:22 as \'joe\'\r\ndebug3: hostkeys_foreach: reading file "/Users/joe/.ssh/known_hosts"\r\ndebug3: record_hostkey: found key type ECDSA in file /Users/joe/.ssh/known_hosts:290\r\ndebug3: load_hostkeys: loaded 1 keys from 10.17.0.2\r\ndebug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521\r\ndebug1: SSH2_MSG_KEXINIT sent\r\ndebug1: SSH2_MSG_KEXINIT received\r\ndebug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1\r\ndebug2: kex_parse_kexinit: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-ed25519,ssh-rsa,ssh-dss\r\ndebug2: kex_parse_kexinit: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se\r\ndebug2: kex_parse_kexinit: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se\r\ndebug2: kex_parse_kexinit: 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,hmac-md5-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96\r\ndebug2: kex_parse_kexinit: 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,hmac-md5-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96\r\ndebug2: kex_parse_kexinit: zlib@openssh.com,zlib,none\r\ndebug2: kex_parse_kexinit: zlib@openssh.com,zlib,none\r\ndebug2: kex_parse_kexinit: \r\ndebug2: kex_parse_kexinit: \r\ndebug2: kex_parse_kexinit: first_kex_follows 0 \r\ndebug2: kex_parse_kexinit: reserved 0 \r\ndebug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1\r\ndebug2: kex_parse_kexinit: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519\r\ndebug2: kex_parse_kexinit: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc\r\ndebug2: kex_parse_kexinit: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc\r\ndebug2: kex_parse_kexinit: 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: kex_parse_kexinit: 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: kex_parse_kexinit: none,zlib@openssh.com\r\ndebug2: kex_parse_kexinit: none,zlib@openssh.com\r\ndebug2: kex_parse_kexinit: \r\ndebug2: kex_parse_kexinit: \r\ndebug2: kex_parse_kexinit: first_kex_follows 0 \r\ndebug2: kex_parse_kexinit: reserved 0 \r\ndebug1: kex: server->client chacha20-poly1305@openssh.com <implicit> zlib@openssh.com\r\ndebug1: kex: client->server chacha20-poly1305@openssh.com <implicit> zlib@openssh.com\r\ndebug1: expecting SSH2_MSG_KEX_ECDH_REPLY\r\ndebug1: Server host key: ecdsa-sha2-nistp256 SHA256:PBy5pJ17qfkwj8ZgZVD4AGBKqxuj62eR6yh9J3nccCU\r\ndebug3: hostkeys_foreach: reading file "/Users/joe/.ssh/known_hosts"\r\ndebug3: record_hostkey: found key type ECDSA in file /Users/joe/.ssh/known_hosts:290\r\ndebug3: load_hostkeys: loaded 1 keys from 10.17.0.2\r\ndebug1: Host \'10.17.0.2\' is known and matches the ECDSA host key.\r\ndebug1: Found key in /Users/joe/.ssh/known_hosts:290\r\ndebug2: set_newkeys: mode 1\r\ndebug1: SSH2_MSG_NEWKEYS sent\r\ndebug1: expecting SSH2_MSG_NEWKEYS\r\ndebug2: set_newkeys: mode 0\r\ndebug1: SSH2_MSG_NEWKEYS received\r\ndebug1: SSH2_MSG_SERVICE_REQUEST sent\r\ndebug2: service_accept: ssh-userauth\r\ndebug1: SSH2_MSG_SERVICE_ACCEPT received\r\ndebug2: key: /Users/joe/.ssh/id_rsa (0x7f8af3f13a60),\r\ndebug2: key: /Users/joe/.ssh/id_o2oatc-equalexperts-usbeta (0x7f8af3e00e00),\r\ndebug2: key: /Users/joe/.ssh/joe-deneb (0x7f8af3e01070),\r\ndebug2: key: /Users/joe/.ssh/id_dsa (0x0),\r\ndebug2: key: /Users/joe/.ssh/id_ecdsa (0x0),\r\ndebug2: key: /Users/joe/.ssh/id_ed25519 (0x0),\r\ndebug1: Authentications that can continue: publickey,keyboard-interactive\r\ndebug3: start over, passed a different list publickey,keyboard-interactive\r\ndebug3: preferred gssapi-with-mic,gssapi-keyex,hostbased,publickey\r\ndebug3: authmethod_lookup publickey\r\ndebug3: remaining preferred: ,gssapi-keyex,hostbased,publickey\r\ndebug3: authmethod_is_enabled publickey\r\ndebug1: Next authentication method: publickey\r\ndebug1: Offering RSA public key: /Users/joe/.ssh/id_rsa\r\ndebug3: send_pubkey_test\r\ndebug2: we sent a publickey packet, wait for reply\r\ndebug1: Server accepts key: pkalg ssh-rsa blen 277\r\ndebug2: input_userauth_pk_ok: fp SHA256:Z8OMi3dkpojsVA9GJOinaUZe/Rqt6Hej50+ZvUphISs\r\ndebug3: sign_and_send_pubkey: RSA SHA256:Z8OMi3dkpojsVA9GJOinaUZe/Rqt6Hej50+ZvUphISs\r\ndebug1: Enabling compression at level 6.\r\ndebug1: Authentication succeeded (publickey).\r\nAuthenticated to 10.17.0.2 ([10.17.0.2]:22).\r\ndebug1: setting up multiplex master socket\r\ndebug3: muxserver_listen: temporary control path /Users/joe/.ansible/cp/9511c3b4be.YNzwaO898xwTuzaq\r\ndebug2: fd 5 setting O_NONBLOCK\r\ndebug3: fd 5 is O_NONBLOCK\r\ndebug3: fd 5 is O_NONBLOCK\r\ndebug1: channel 0: new [/Users/joe/.ansible/cp/9511c3b4be]\r\ndebug3: muxserver_listen: mux listener channel 0 fd 5\r\ndebug2: fd 3 setting TCP_NODELAY\r\ndebug3: ssh_packet_set_tos: set IP_TOS 0x08\r\ndebug1: control_persist_detach: backgrounding master process\r\ndebug2: control_persist_detach: background process is 95171\r\ndebug2: fd 5 setting O_NONBLOCK\r\ndebug1: forking to background\r\ndebug1: Entering interactive session.\r\ndebug2: set_control_persist_exit_time: schedule exit in 60 seconds\r\ndebug1: multiplexing control connection\r\ndebug3: fd 6 is O_NONBLOCK\r\ndebug3: fd 6 is O_NONBLOCK\r\ndebug1: channel 1: new [mux-control]\r\ndebug3: channel_post_mux_listener: new mux channel 1 fd 6\r\ndebug3: mux_master_read_cb: channel 1: hello sent\r\ndebug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0\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: process_mux_master_hello: channel 1 slave 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: process_mux_alive_check: channel 1: alive check\r\ndebug3: mux_client_request_alive: done pid = 95173\r\ndebug3: mux_client_request_session: session request sent\r\ndebug3: mux_master_read_cb: channel 1 packet type 0x10000002 len 100\r\ndebug2: process_mux_new_session: channel 1: request tty 0, X 0, agent 1, subsys 0, term "xterm-256color", cmd "/bin/sh -c \'echo ~ && sleep 0\'", env 1\r\ndebug3: process_mux_new_session: got fds stdin 7, stdout 8, stderr 9\r\ndebug2: fd 8 setting O_NONBLOCK\r\ndebug2: fd 9 setting O_NONBLOCK\r\ndebug1: channel 2: new [client-session]\r\ndebug2: process_mux_new_session: channel_new: 2 linked to control channel 1\r\ndebug2: channel 2: send open\r\ndebug2: callback start\r\ndebug1: Requesting authentication agent forwarding.\r\ndebug2: channel 2: request auth-agent-req@openssh.com confirm 0\r\ndebug2: client_session2_setup: id 2\r\ndebug1: Sending environment.\r\ndebug1: Sending env LANG = en_GB.UTF-8\r\ndebug2: channel 2: request env confirm 0\r\ndebug1: Sending command: /bin/sh -c \'echo ~ && sleep 0\'\r\ndebug2: channel 2: request exec confirm 1\r\ndebug3: mux_session_confirm: sending success reply\r\ndebug2: 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\ndebug2: channel_input_status_confirm: type 99 id 2\r\ndebug2: exec request accepted on channel 2\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\ndebug1: client_input_channel_req: channel 2 rtype eow@openssh.com reply 0\r\ndebug2: channel 2: rcvd eow\r\ndebug2: channel 2: close_read\r\ndebug2: channel 2: input open -> closed\r\ndebug2: channel 2: rcvd eof\r\ndebug2: channel 2: output open -> drain\r\ndebug2: channel 2: obuf empty\r\ndebug2: channel 2: close_write\r\ndebug2: channel 2: output drain -> closed\r\ndebug2: channel 2: rcvd close\r\ndebug3: channel 2: will not send data after close\r\ndebug2: channel 2: send close\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: channel 1: close_read\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  #2 client-session (t4 r0 i3/0 o3/0 fd -1/-1 cc -1)\r\n\r\ndebug2: channel 1: obuf empty\r\ndebug2: channel 1: close_write\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\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\ndebug2: set_control_persist_exit_time: schedule exit in 60 seconds\r\n')
<10.17.0.2> ESTABLISH SSH CONNECTION FOR USER: joe
<10.17.0.2> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=joe -o ConnectTimeout=10 -o ControlPath=/Users/joe/.ansible/cp/9511c3b4be 10.17.0.2 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/joe/.ansible/tmp/ansible-tmp-1491778533.38-208886832167549 `" && echo ansible-tmp-1491778533.38-208886832167549="` echo /home/joe/.ansible/tmp/ansible-tmp-1491778533.38-208886832167549 `" ) && sleep 0'"'"''
<10.17.0.2> (0, 'ansible-tmp-1491778533.38-208886832167549=/home/joe/.ansible/tmp/ansible-tmp-1491778533.38-208886832167549\n', 'OpenSSH_6.9p1, LibreSSL 2.1.8\r\ndebug1: Reading configuration data /Users/joe/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 20: Applying options for *\r\ndebug1: /etc/ssh/ssh_config line 53: 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 = 95173\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')
<10.17.0.2> PUT /var/folders/p4/rjqvjlbx2rz1cs9x74f0tb6m0000gp/T/tmpPy03eh TO /home/joe/.ansible/tmp/ansible-tmp-1491778533.38-208886832167549/setup.py
<10.17.0.2> SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=joe -o ConnectTimeout=10 -o ControlPath=/Users/joe/.ansible/cp/9511c3b4be '[10.17.0.2]'
<10.17.0.2> (0, 'sftp> put /var/folders/p4/rjqvjlbx2rz1cs9x74f0tb6m0000gp/T/tmpPy03eh /home/joe/.ansible/tmp/ansible-tmp-1491778533.38-208886832167549/setup.py\n', 'OpenSSH_6.9p1, LibreSSL 2.1.8\r\ndebug1: Reading configuration data /Users/joe/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 20: Applying options for *\r\ndebug1: /etc/ssh/ssh_config line 53: 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 = 95173\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\ndebug3: Sent message fd 8 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -> /usr/home/joe size 0\r\ndebug3: Looking up /var/folders/p4/rjqvjlbx2rz1cs9x74f0tb6m0000gp/T/tmpPy03eh\r\ndebug3: Sent message fd 8 T:17 I:2\r\ndebug3: Received stat reply T:101 I:2\r\ndebug1: Couldn\'t stat remote file: No such file or directory\r\ndebug3: Sent message SSH2_FXP_OPEN I:3 P:/home/joe/.ansible/tmp/ansible-tmp-1491778533.38-208886832167549/setup.py\r\ndebug3: Sent message SSH2_FXP_WRITE I:4 O:0 S:32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 4 32768 bytes at 0\r\ndebug3: Sent message SSH2_FXP_WRITE I:5 O:32768 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:6 O:65536 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:7 O:98304 S:12640\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 5 32768 bytes at 32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 6 32768 bytes at 65536\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 7 12640 bytes at 98304\r\ndebug3: Sent message SSH2_FXP_CLOSE I:4\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')
<10.17.0.2> ESTABLISH SSH CONNECTION FOR USER: joe
<10.17.0.2> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=joe -o ConnectTimeout=10 -o ControlPath=/Users/joe/.ansible/cp/9511c3b4be 10.17.0.2 '/bin/sh -c '"'"'chmod u+x /home/joe/.ansible/tmp/ansible-tmp-1491778533.38-208886832167549/ /home/joe/.ansible/tmp/ansible-tmp-1491778533.38-208886832167549/setup.py && sleep 0'"'"''
<10.17.0.2> (0, '', 'OpenSSH_6.9p1, LibreSSL 2.1.8\r\ndebug1: Reading configuration data /Users/joe/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 20: Applying options for *\r\ndebug1: /etc/ssh/ssh_config line 53: 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 = 95173\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')
<10.17.0.2> ESTABLISH SSH CONNECTION FOR USER: joe
<10.17.0.2> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=joe -o ConnectTimeout=10 -o ControlPath=/Users/joe/.ansible/cp/9511c3b4be -tt 10.17.0.2 '/bin/sh -c '"'"'/usr/local/bin/python2.7 /home/joe/.ansible/tmp/ansible-tmp-1491778533.38-208886832167549/setup.py; rm -rf "/home/joe/.ansible/tmp/ansible-tmp-1491778533.38-208886832167549/" > /dev/null 2>&1 && sleep 0'"'"''
<10.17.0.2> (0, '\r\n{"invocation": {"module_args": {"filter": "*", "gather_subset": ["all"], "fact_path": "/etc/ansible/facts.d", "gather_timeout": 10}}, "changed": false, "ansible_facts": {"ansible_product_serial": "NA", "ansible_form_factor": "NA", "ansible_product_version": "NA", "ansible_fips": false, "ansible_service_mgr": "bsdinit", "ansible_swaptotal_mb": 2048, "module_setup": true, "ansible_userspace_bits": "64", "ansible_architecture": "amd64", "ansible_distribution_version": "11.0", "ansible_domain": "", "ansible_date_time": {"weekday_number": "1", "iso8601_basic_short": "20170410T005532", "tz": "BST", "weeknumber": "15", "hour": "00", "year": "2017", "minute": "55", "tz_offset": "+0100", "month": "04", "epoch": "1491782132", "iso8601_micro": "2017-04-09T23:55:32.594514Z", "weekday": "Monday", "time": "00:55:32", "date": "2017-04-10", "iso8601": "2017-04-09T23:55:32Z", "day": "10", "iso8601_basic": "20170410T005532594423", "second": "32"}, "ansible_ssh_host_key_ed25519_public": "AAAAC3NzaC1lZDI1NTE5AAAAIJjMiJPP4VD9Dc3y7ovUoq6nmJjR1lt6CC3K91Pfg95X", "ansible_virtualization_role": "", "ansible_em1": {"status": "active", "macaddress": "08:00:27:1a:99:e7", "media": "Ethernet", "metric": "0", "media_options": ["full-duplex"], "mtu": "1500", "flags": ["UP", "BROADCAST", "RUNNING", "SIMPLEX", "MULTICAST"], "ipv4": [{"broadcast": "10.17.0.255", "netmask": "255.255.255.0", "network": "10.17.0.0", "address": "10.17.0.2"}], "ipv6": [], "device": "em1", "media_type": "1000baseT", "media_select": "autoselect", "type": "ether", "options": ["PERFORMNUD", "IFDISABLED", "AUTO_LINKLOCAL"]}, "ansible_dns": {"nameservers": ["217.169.20.20", "217.169.20.21"], "search": ["karthauser.co.uk"]}, "ansible_effective_group_id": 0, "ansible_bios_version": "NA", "ansible_processor": ["Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz (2802.42-MHz K8-class CPU)"], "ansible_virtualization_type": "", "ansible_default_ipv6": {}, "ansible_memtotal_mb": 3942, "ansible_ssh_host_key_ecdsa_public": "AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBI5CPa5abJiDtzJaU8CgJazkVIUORGzXUfA/XpSa/o0HWwq/q1OVv6stit0K0B+jP1fBOPTakQXOC/wGjTrfl/8=", "ansible_real_user_id": 1001, "ansible_default_ipv4": {"status": "active", "macaddress": "08:00:27:ca:2b:91", "network": "10.0.2.0", "media": "Ethernet", "metric": "0", "media_options": ["full-duplex"], "mtu": "1500", "broadcast": "10.0.2.255", "interface": "em0", "netmask": "255.255.255.0", "flags": ["UP", "BROADCAST", "RUNNING", "SIMPLEX", "MULTICAST"], "gateway": "10.0.2.2", "address": "10.0.2.15", "device": "em0", "media_type": "1000baseT", "media_select": "autoselect", "type": "ether", "options": ["PERFORMNUD", "IFDISABLED", "AUTO_LINKLOCAL"]}, "ansible_swapfree_mb": 2048, "ansible_gather_subset": ["hardware", "network", "virtual"], "ansible_distribution_release": "11.0-RELEASE-p1", "ansible_system_vendor": "NA", "ansible_apparmor": {"status": "disabled"}, "ansible_effective_user_id": 1001, "ansible_mounts": [{"size_total": null, "mount": "none", "size_available": null, "fstype": "swap", "device": "/dev/ada0p2", "options": "sw"}], "ansible_selinux": false, "ansible_os_family": "FreeBSD", "ansible_em0": {"status": "active", "macaddress": "08:00:27:ca:2b:91", "media": "Ethernet", "metric": "0", "media_options": ["full-duplex"], "mtu": "1500", "flags": ["UP", "BROADCAST", "RUNNING", "SIMPLEX", "MULTICAST"], "ipv4": [{"broadcast": "10.0.2.255", "netmask": "255.255.255.0", "network": "10.0.2.0", "address": "10.0.2.15"}, {"broadcast": "192.168.1.255", "netmask": "255.255.255.0", "network": "192.168.1.0", "address": "192.168.1.101"}], "ipv6": [], "device": "em0", "media_type": "1000baseT", "media_select": "autoselect", "type": "ether", "options": ["PERFORMNUD", "IFDISABLED", "AUTO_LINKLOCAL"]}, "ansible_product_uuid": "NA", "ansible_product_name": "NA", "ansible_pkg_mgr": "pkgng", "ansible_memfree_mb": 193, "ansible_devices": {"ada0": []}, "ansible_user_uid": 1001, "ansible_user_id": "joe", "ansible_distribution": "FreeBSD", "ansible_env": {"TERM": "xterm-256color", "SHELL": "/bin/sh", "MAIL": "/var/mail/joe", "SSH_TTY": "/dev/pts/0", "SSH_AUTH_SOCK": "/tmp/ssh-nFKUYemuOY/agent.73422", "SSH_CLIENT": "10.17.0.1 57855 22", "PWD": "/usr/home/joe", "LOGNAME": "joe", "USER": "joe", "BLOCKSIZE": "K", "PATH": "/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/joe/bin", "SSH_CONNECTION": "10.17.0.1 57855 10.17.0.2 22", "HOME": "/home/joe"}, "ansible_distribution_major_version": "11", "ansible_user_dir": "/home/joe", "ansible_processor_count": "1", "ansible_hostname": "", "ansible_lo0": {"macaddress": "unknown", "metric": "0", "mtu": "16384", "flags": ["UP", "LOOPBACK", "RUNNING", "MULTICAST"], "ipv4": [{"broadcast": "127.255.255.255", "netmask": "255.0.0.0", "network": "127.0.0.0", "address": "127.0.0.1"}], "ipv6": [{"prefix": "128", "address": "::1"}, {"scope": "0x3", "prefix": "64", "address": "fe80::1%lo0"}], "device": "lo0", "type": "loopback", "options": ["PERFORMNUD", "AUTO_LINKLOCAL"]}, "ansible_real_group_id": 0, "ansible_bios_date": "NA", "ansible_all_ipv6_addresses": [], "ansible_interfaces": ["lo0", "em1", "em0"], "ansible_machine": "amd64", "ansible_ssh_host_key_rsa_public": "AAAAB3NzaC1yc2EAAAADAQABAAABAQCbWNk1RVLVzSwI3dpYVDsIcGmuW9/Xy81dwKZnuTViNF+JoBD+hjG/23rOYfXhE+AQ+ouD9nZVxceORRfg8V7Mte/X7+G2um2iPUM7zsLcpq+6fuC89bXxsNljTKa1/dI4ZzaUyBVE0AbSUojX0E4J57B4cf2CiIA7/A6wKVQp76oziX78FLiO8EInvPbqAMpdgJ0IL3goskxIgkgWQmGTjBpp7hZgv8VTXk/5j74dxvgTlm6duQpUEb7QPI8iJGJOq0Rcqf10rYiVteFplh8WiOcu7iH0k/FED9cTlba/gFqFyZvuIkP8MfA2v4aH0tCxVassutiyGle2qwL7p5Hb", "ansible_user_gecos": "User &", "ansible_python": {"executable": "/usr/local/bin/python2.7", "version": {"micro": 13, "major": 2, "releaselevel": "final", "serial": 0, "minor": 7}, "type": "CPython", "has_sslcontext": true, "version_info": [2, 7, 13, "final", 0]}, "ansible_kernel": "11.0-RELEASE-p1", "ansible_fqdn": "", "ansible_user_gid": 0, "ansible_nodename": "", "ansible_system": "FreeBSD", "ansible_user_shell": "/bin/sh", "ansible_all_ipv4_addresses": ["10.0.2.15", "192.168.1.101", "10.17.0.2"], "ansible_python_version": "2.7.13"}}\r\n', 'OpenSSH_6.9p1, LibreSSL 2.1.8\r\ndebug1: Reading configuration data /Users/joe/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 20: Applying options for *\r\ndebug1: /etc/ssh/ssh_config line 53: 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 = 95173\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 10.17.0.2 closed.\r\n')
ok: [test]
META: ran handlers

TASK [pkgng] **********************************************************************************************************************************************************************
task path: /Users/joe/Documents/TrueSpeed/repositories/true-services-dev/ansible-plays/xxx-playbook.yml:5
Using module file /Users/joe/Documents/TrueSpeed/repositories/ansible/lib/ansible/modules/extras/packaging/os/pkgng.py
<10.17.0.2> ESTABLISH SSH CONNECTION FOR USER: joe
<10.17.0.2> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=joe -o ConnectTimeout=10 -o ControlPath=/Users/joe/.ansible/cp/9511c3b4be 10.17.0.2 '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<10.17.0.2> (0, '/home/joe\n', 'OpenSSH_6.9p1, LibreSSL 2.1.8\r\ndebug1: Reading configuration data /Users/joe/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 20: Applying options for *\r\ndebug1: /etc/ssh/ssh_config line 53: 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 = 95173\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')
<10.17.0.2> ESTABLISH SSH CONNECTION FOR USER: joe
<10.17.0.2> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=joe -o ConnectTimeout=10 -o ControlPath=/Users/joe/.ansible/cp/9511c3b4be 10.17.0.2 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/joe/.ansible/tmp/ansible-tmp-1491778534.49-62571905463075 `" && echo ansible-tmp-1491778534.49-62571905463075="` echo /home/joe/.ansible/tmp/ansible-tmp-1491778534.49-62571905463075 `" ) && sleep 0'"'"''
<10.17.0.2> (0, 'ansible-tmp-1491778534.49-62571905463075=/home/joe/.ansible/tmp/ansible-tmp-1491778534.49-62571905463075\n', 'OpenSSH_6.9p1, LibreSSL 2.1.8\r\ndebug1: Reading configuration data /Users/joe/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 20: Applying options for *\r\ndebug1: /etc/ssh/ssh_config line 53: 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 = 95173\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')
<10.17.0.2> PUT /var/folders/p4/rjqvjlbx2rz1cs9x74f0tb6m0000gp/T/tmpStijd4 TO /home/joe/.ansible/tmp/ansible-tmp-1491778534.49-62571905463075/pkgng.py
<10.17.0.2> SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=joe -o ConnectTimeout=10 -o ControlPath=/Users/joe/.ansible/cp/9511c3b4be '[10.17.0.2]'
<10.17.0.2> (0, 'sftp> put /var/folders/p4/rjqvjlbx2rz1cs9x74f0tb6m0000gp/T/tmpStijd4 /home/joe/.ansible/tmp/ansible-tmp-1491778534.49-62571905463075/pkgng.py\n', 'OpenSSH_6.9p1, LibreSSL 2.1.8\r\ndebug1: Reading configuration data /Users/joe/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 20: Applying options for *\r\ndebug1: /etc/ssh/ssh_config line 53: 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 = 95173\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\ndebug3: Sent message fd 8 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -> /usr/home/joe size 0\r\ndebug3: Looking up /var/folders/p4/rjqvjlbx2rz1cs9x74f0tb6m0000gp/T/tmpStijd4\r\ndebug3: Sent message fd 8 T:17 I:2\r\ndebug3: Received stat reply T:101 I:2\r\ndebug1: Couldn\'t stat remote file: No such file or directory\r\ndebug3: Sent message SSH2_FXP_OPEN I:3 P:/home/joe/.ansible/tmp/ansible-tmp-1491778534.49-62571905463075/pkgng.py\r\ndebug3: Sent message SSH2_FXP_WRITE I:4 O:0 S:32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 4 32768 bytes at 0\r\ndebug3: Sent message SSH2_FXP_WRITE I:5 O:32768 S:32622\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 5 32622 bytes at 32768\r\ndebug3: Sent message SSH2_FXP_CLOSE I:4\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')
<10.17.0.2> ESTABLISH SSH CONNECTION FOR USER: joe
<10.17.0.2> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=joe -o ConnectTimeout=10 -o ControlPath=/Users/joe/.ansible/cp/9511c3b4be 10.17.0.2 '/bin/sh -c '"'"'chmod u+x /home/joe/.ansible/tmp/ansible-tmp-1491778534.49-62571905463075/ /home/joe/.ansible/tmp/ansible-tmp-1491778534.49-62571905463075/pkgng.py && sleep 0'"'"''
<10.17.0.2> (0, '', 'OpenSSH_6.9p1, LibreSSL 2.1.8\r\ndebug1: Reading configuration data /Users/joe/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 20: Applying options for *\r\ndebug1: /etc/ssh/ssh_config line 53: 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 = 95173\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')
<10.17.0.2> ESTABLISH SSH CONNECTION FOR USER: joe
<10.17.0.2> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=joe -o ConnectTimeout=10 -o ControlPath=/Users/joe/.ansible/cp/9511c3b4be -tt 10.17.0.2 '/bin/sh -c '"'"'/usr/local/bin/python2.7 /home/joe/.ansible/tmp/ansible-tmp-1491778534.49-62571905463075/pkgng.py; rm -rf "/home/joe/.ansible/tmp/ansible-tmp-1491778534.49-62571905463075/" > /dev/null 2>&1 && sleep 0'"'"''
<10.17.0.2> (0, 'Traceback (most recent call last):\r\n  File "/tmp/ansible_wM41cV/ansible_module_pkgng.py", line 328, in <module>\r\n    main()        \r\n  File "/tmp/ansible_wM41cV/ansible_module_pkgng.py", line 307, in main\r\n    _changed, _msg = install_packages(module, pkgng_path, pkgs, p["cached"], p["pkgsite"], dir_arg)\r\n  File "/tmp/ansible_wM41cV/ansible_module_pkgng.py", line 156, in install_packages\r\n    old_pkgng = pkgng_older_than(module, pkgng_path, [1, 1, 4])\r\n  File "/tmp/ansible_wM41cV/ansible_module_pkgng.py", line 116, in pkgng_older_than\r\n    while compare_version[i] == version[i]:\r\nTypeError: \'itertools.imap\' object has no attribute \'__getitem__\'\r\n', 'OpenSSH_6.9p1, LibreSSL 2.1.8\r\ndebug1: Reading configuration data /Users/joe/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 20: Applying options for *\r\ndebug1: /etc/ssh/ssh_config line 53: 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 = 95173\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 10.17.0.2 closed.\r\n')
fatal: [test]: FAILED! => {
    "changed": false, 
    "failed": true, 
    "module_stderr": "OpenSSH_6.9p1, LibreSSL 2.1.8\r\ndebug1: Reading configuration data /Users/joe/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 20: Applying options for *\r\ndebug1: /etc/ssh/ssh_config line 53: 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 = 95173\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 10.17.0.2 closed.\r\n", 
    "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_wM41cV/ansible_module_pkgng.py\", line 328, in <module>\r\n    main()        \r\n  File \"/tmp/ansible_wM41cV/ansible_module_pkgng.py\", line 307, in main\r\n    _changed, _msg = install_packages(module, pkgng_path, pkgs, p[\"cached\"], p[\"pkgsite\"], dir_arg)\r\n  File \"/tmp/ansible_wM41cV/ansible_module_pkgng.py\", line 156, in install_packages\r\n    old_pkgng = pkgng_older_than(module, pkgng_path, [1, 1, 4])\r\n  File \"/tmp/ansible_wM41cV/ansible_module_pkgng.py\", line 116, in pkgng_older_than\r\n    while compare_version[i] == version[i]:\r\nTypeError: 'itertools.imap' object has no attribute '__getitem__'\r\n", 
    "msg": "MODULE FAILURE", 
    "rc": 0
}
    to retry, use: --limit @/Users/joe/Documents/TrueSpeed/repositories/true-services-dev/ansible-plays/xxx-playbook.retry

PLAY RECAP ************************************************************************************************************************************************************************
test                       : ok=1    changed=0    unreachable=0    failed=1   
Infiniverse commented 7 years ago

I'm really confused as to what might be going on. I've tried bisecting back a few months, but I can't find a version that works - however the version that pip installed works fine.

ansibot commented 7 years ago

cc @JoergFiedler click here for bot help

Infiniverse commented 7 years ago

Looks like it might be something to do with how SSH is being handled.

alikins commented 7 years ago

(formatted traceback for easier reading)

Traceback (most recent call last):
  File "/tmp/ansible_wM41cV/ansible_module_pkgng.py", line 328, in <module>
    main()        
  File "/tmp/ansible_wM41cV/ansible_module_pkgng.py", line 307, in main
    _changed, _msg = install_packages(module, pkgng_path, pkgs, p["cached"], p["pkgsite"], dir_arg)
  File "/tmp/ansible_wM41cV/ansible_module_pkgng.py", line 156, in install_packages
    old_pkgng = pkgng_older_than(module, pkgng_path, [1, 1, 4])
  File "/tmp/ansible_wM41cV/ansible_module_pkgng.py", line 116, in pkgng_older_than
    while compare_version[i] == version[i]:
TypeError: 'itertools.imap' object has no attribute '__getitem__'
alikins commented 7 years ago

(formatted stderr/ssh stderr for easier reading)

OpenSSH_6.9p1, LibreSSL 2.1.8
debug1: Reading configuration data /Users/joe/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 20: Applying options for *
debug1: /etc/ssh/ssh_config line 53: Applying options for *
debug1: auto-mux: Trying existing master
debug2: fd 3 setting O_NONBLOCK
debug2: mux_client_hello_exchange: master version 4
debug3: mux_client_forwards: request forwardings: 0 local, 0 remote
debug3: mux_client_request_session: entering
debug3: mux_client_request_alive: entering
debug3: mux_client_request_alive: done pid = 95173
debug3: mux_client_request_session: session request sent
debug1: mux_client_request_session: master session id: 2
debug3: mux_client_read_packet: read header failed: Broken pipe
debug2: Received exit status from master 0
Shared connection to 10.17.0.2 closed.
Infiniverse commented 7 years ago

I'm concerned about the 'broken pipe's, but looking at the successful logs it seems that that's a normal behaviour for the ssh connection rather than the cause of the issue.

alikins commented 7 years ago

The 'Broken pipe' from stderr looks like it could be related to https://github.com/ansible/ansible/issues/16731

I don't know if the errors are related or not.

I don't see anything that I'd expect to cause the 'itertools.imap' error though (nothing seems to reference itertools, all the types involved look to be plain lists, etc...)

alikins commented 7 years ago

Using module file /Users/joe/Documents/TrueSpeed/repositories/ansible/lib/ansible/modules/extras/packaging/os/pkgng.py

For 2.4, there should not be a modules/extras/ directory. Is 'library' configured to point to /Users/joe/Documents/TrueSpeed/repositories/ansible/lib/ansible/modules/extras somewhere?

Maybe the 2.4 checkout still has the old lib/ansible/modules/core/ and lib/ansible/modules/extras directories?

mv/rm them if they exist in a 2.4 checkout.

Infiniverse commented 7 years ago

It does appear to have both:

unnamed-84:ansible joe$ git log origin/devel HEAD | head -6
commit 3b5dd4e0a0c796d145b19c224ff95a2d2ca62e4f
Author: Hao Wang <hao.1.wang@gmail.com>
Date:   Sun Mar 19 17:44:26 2017 +0000

    file module doesn't create hard link to given target directory

unnamed-84:ansible joe$ git log lib/ansible/modules/extras | head -7
commit 011ea55a8f1630842c67603ac601d4d7ef6ccef9
Author: James Cammarata <jimi@sngx.net>
Date:   Thu Dec 8 00:36:57 2016 -0500

    Relocating extras into lib/ansible/modules/ after merge

unnamed-84:ansible joe$ git log lib/ansible/modules/core | head -7
commit c7eec45b73d59929679e94c91037b8329dc97188
Author: Michael DeHaan <michael.dehaan@gmail.com>
Date:   Fri Sep 26 10:13:26 2014 -0400

    Restructuring.
Infiniverse commented 7 years ago

Removing core and extras fixes the problem. How did they end up in the devel/ branch if they've been removed already?

ansibot commented 6 years ago

cc @bleader click here for bot help

ansibot commented 5 years ago

cc @AMDmi3 @acozine @bcoca @berenddeboer @dagwieers @eest @jasperla @overhacked @tuxillo click here for bot help

ansibot commented 5 years ago

cc @mekanix @opoplawski click here for bot help

ansibot commented 5 years ago

cc @MacLemon click here for bot help

ansibot commented 5 years ago

cc @dch click here for bot help

acozine commented 4 years ago

This issue appears to be out of date. We're closing it. Future issues related to the pkgng module should be filed on the repo for the relevant community collection.