# Buggy code
def main():
    module = AnsibleModule(
        argument_spec=dict(
            name=dict(required=True, aliases=["pkg"], type="list"),
            state=dict(
                required=False,
                default="present",
                choices=[
                    "absent",
                    "installed",
                    "latest",
                    "present",
                    "removed",
                    "dist-upgrade",
                ],
            ),
            type=dict(
                required=False,
                default="package",
                choices=[
                    "package",
                    "patch",
                    "pattern",
                    "product",
                    "srcpackage",
                    "application",
                ],
            ),
            extra_args_precommand=dict(required=False, default=None),
            disable_gpg_check=dict(required=False, default="no", type="bool"),
            disable_recommends=dict(required=False, default="yes", type="bool"),
            force=dict(required=False, default="no", type="bool"),
            update_cache=dict(
                required=False, aliases=["refresh"], default="no", type="bool"
            ),
            oldpackage=dict(required=False, default="no", type="bool"),
            extra_args=dict(required=False, default=None),
        ),
        supports_check_mode=True,
    )

    name = module.params["name"]
    state = module.params["state"]
    update_cache = module.params["update_cache"]

    # remove empty strings from package list
    name = filter(None, name)

    # Refresh repositories
    if update_cache and not module.check_mode:
        retvals = repo_refresh(module)

        if retvals["rc"] != 0:
            module.fail_json(msg="Zypper refresh run failed.", **retvals)

    # Perform requested action
    if name == ["*"] and state in ["latest", "dist-upgrade"]:
        packages_changed, retvals = package_update_all(module)
    elif name != ["*"] and state == "dist-upgrade":
        module.fail_json(msg="Can not dist-upgrade specific packages.")
    else:
        if state in ["absent", "removed"]:
            packages_changed, retvals = package_absent(module, name)
        elif state in ["installed", "present", "latest"]:
            packages_changed, retvals = package_present(module, name, state == "latest")

    retvals["changed"] = retvals["rc"] == 0 and bool(packages_changed)

    if module._diff:
        set_diff(module, retvals, packages_changed)

    if retvals["rc"] != 0:
        module.fail_json(msg="Zypper run failed.", **retvals)

    if not retvals["changed"]:
        del retvals["stdout"]
        del retvals["stderr"]

    module.exit_json(name=name, state=state, update_cache=update_cache, **retvals)


# Traceback (nTypeError)
[root@awx ansibuild]# ansible-playbook -i testservers bug.yaml -k -vvvv
ansible-playbook 2.5.5
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modul                                                                                                           es']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible-playbook
python version = 2.7.5 (default, Feb 20 2018, 09:19:12) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]
Using /etc/ansible/ansible.cfg as config file
SSH password:
setting up inventory plugins
Parsed /Maintenance/ansibuild/testservers inventory source with ini plugin
Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugi                                                                                                           ns/callback/default.pyc

PLAYBOOK: bug.yaml *************************************************************************************
1 plays in bug.yaml

PLAY [testservers] *************************************************************************************

TASK [Gathering Facts] *********************************************************************************
task path: /Maintenance/ansibuild/bug.yaml:2
Using module file /usr/lib/python2.7/site-packages/ansible/modules/system/setup.py
<sles15test> ESTABLISH SSH CONNECTION FOR USER: root
<sles15test> SSH: EXEC sshpass -d12 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o Strict                                                                                                           HostKeyChecking=no -o User=root -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/d4b42411f1 192.168.                                                                                                           71.141 '/bin/sh -c '"'"'echo ~root &amp;&amp; sleep 0'"'"''
<sles15test> (0, '/root\n', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: Control socket "/root/.ansible/cp/d4b42411f1" does not exist\r\ndebug2: resolving "sles15test" port 22\r\ndebug2: ssh_connect_direct: needpriv 0\r\ndebug1: Connecting to sles15test [sles15test] 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: permanently_set_uid: 0/0\r\ndebug1: identity file /root/.ssh/id_rsa type 1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /root/.ssh/id_rsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /root/.ssh/id_dsa type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /root/.ssh/id_dsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /root/.ssh/id_ecdsa type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /root/.ssh/id_ecdsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /root/.ssh/id_ed25519 type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /root/.ssh/id_ed25519-cert type -1\r\ndebug1: Enabling compatibility mode for protocol 2.0\r\ndebug1: Local version string SSH-2.0-OpenSSH_7.4\r\ndebug1: Remote protocol version 2.0, remote software version OpenSSH_7.6\r\ndebug1: match: OpenSSH_7.6 pat OpenSSH* compat 0x04000000\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: Authenticating to sles15test:22 as \'root\'\r\ndebug3: hostkeys_foreach: reading file "/root/.ssh/known_hosts"\r\ndebug3: record_hostkey: found key type ECDSA in file /root/.ssh/known_hosts:79\r\ndebug3: load_hostkeys: loaded 1 keys from sles15test\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\ndebug3: send packet: type 20\r\ndebug1: SSH2_MSG_KEXINIT sent\r\ndebug3: receive packet: type 20\r\ndebug1: SSH2_MSG_KEXINIT received\r\ndebug2: local client KEXINIT proposal\r\ndebug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1,ext-info-c\r\ndebug2: host key algorithms: 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-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss\r\ndebug2: ciphers ctos: 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: ciphers stoc: 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: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: compression ctos: zlib@openssh.com,zlib,none\r\ndebug2: compression stoc: zlib@openssh.com,zlib,none\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first_kex_follows 0 \r\ndebug2: reserved 0 \r\ndebug2: peer server KEXINIT proposal\r\ndebug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1\r\ndebug2: host key algorithms: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519\r\ndebug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com\r\ndebug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com\r\ndebug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: compression ctos: none,zlib@openssh.com\r\ndebug2: compression stoc: none,zlib@openssh.com\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first_kex_follows 0 \r\ndebug2: reserved 0 \r\ndebug1: kex: algorithm: curve25519-sha256\r\ndebug1: kex: host key algorithm: ecdsa-sha2-nistp256\r\ndebug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: zlib@openssh.com\r\ndebug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: zlib@openssh.com\r\ndebug1: kex: curve25519-sha256 need=64 dh_need=64\r\ndebug1: kex: curve25519-sha256 need=64 dh_need=64\r\ndebug3: send packet: type 30\r\ndebug1: expecting SSH2_MSG_KEX_ECDH_REPLY\r\ndebug3: receive packet: type 31\r\ndebug1: Server host key: ecdsa-sha2-nistp256 SHA256:Gm7UI68XC0v2MModYmn7zQFq5NQjpgYbj6KJvGc4VLU\r\ndebug3: hostkeys_foreach: reading file "/root/.ssh/known_hosts"\r\ndebug3: record_hostkey: found key type ECDSA in file /root/.ssh/known_hosts:79\r\ndebug3: load_hostkeys: loaded 1 keys from sles15test\r\ndebug1: Host \'sles15test\' is known and matches the ECDSA host key.\r\ndebug1: Found key in /root/.ssh/known_hosts:79\r\ndebug3: send packet: type 21\r\ndebug2: set_newkeys: mode 1\r\ndebug1: rekey after 134217728 blocks\r\ndebug1: SSH2_MSG_NEWKEYS sent\r\ndebug1: expecting SSH2_MSG_NEWKEYS\r\ndebug3: receive packet: type 21\r\ndebug1: SSH2_MSG_NEWKEYS received\r\ndebug2: set_newkeys: mode 0\r\ndebug1: rekey after 134217728 blocks\r\ndebug2: key: /root/.ssh/id_rsa (0x56169b217690)\r\ndebug2: key: /root/.ssh/id_dsa ((nil))\r\ndebug2: key: /root/.ssh/id_ecdsa ((nil))\r\ndebug2: key: /root/.ssh/id_ed25519 ((nil))\r\ndebug3: send packet: type 5\r\ndebug3: receive packet: type 7\r\ndebug1: SSH2_MSG_EXT_INFO received\r\ndebug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,null>\r\ndebug3: receive packet: type 6\r\ndebug2: service_accept: ssh-userauth\r\ndebug1: SSH2_MSG_SERVICE_ACCEPT received\r\ndebug3: send packet: type 50\r\ndebug3: receive packet: type 51\r\ndebug1: Authentications that can continue: publickey,password,keyboard-interactive\r\ndebug3: start over, passed a different list publickey,password,keyboard-interactive\r\ndebug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password\r\ndebug3: authmethod_lookup publickey\r\ndebug3: remaining preferred: keyboard-interactive,password\r\ndebug3: authmethod_is_enabled publickey\r\ndebug1: Next authentication method: publickey\r\ndebug1: Offering RSA public key: /root/.ssh/id_rsa\r\ndebug3: send_pubkey_test\r\ndebug3: send packet: type 50\r\ndebug2: we sent a publickey packet, wait for reply\r\ndebug3: receive packet: type 51\r\ndebug1: Authentications that can continue: publickey,password,keyboard-interactive\r\ndebug1: Trying private key: /root/.ssh/id_dsa\r\ndebug3: no such identity: /root/.ssh/id_dsa: No such file or directory\r\ndebug1: Trying private key: /root/.ssh/id_ecdsa\r\ndebug3: no such identity: /root/.ssh/id_ecdsa: No such file or directory\r\ndebug1: Trying private key: /root/.ssh/id_ed25519\r\ndebug3: no such identity: /root/.ssh/id_ed25519: No such file or directory\r\ndebug2: we did not send a packet, disable method\r\ndebug3: authmethod_lookup keyboard-interactive\r\ndebug3: remaining preferred: password\r\ndebug3: authmethod_is_enabled keyboard-interactive\r\ndebug1: Next authentication method: keyboard-interactive\r\ndebug2: userauth_kbdint\r\ndebug3: send packet: type 50\r\ndebug2: we sent a keyboard-interactive packet, wait for reply\r\ndebug3: receive packet: type 60\r\ndebug2: input_userauth_info_req\r\ndebug2: input_userauth_info_req: num_prompts 1\r\ndebug3: send packet: type 61\r\ndebug3: receive packet: type 60\r\ndebug2: input_userauth_info_req\r\ndebug2: input_userauth_info_req: num_prompts 0\r\ndebug3: send packet: type 61\r\ndebug3: receive packet: type 52\r\ndebug1: Enabling compression at level 6.\r\ndebug1: Authentication succeeded (keyboard-interactive).\r\nAuthenticated to sles15test ([sles15test]:22).\r\ndebug1: setting up multiplex master socket\r\ndebug3: muxserver_listen: temporary control path /root/.ansible/cp/d4b42411f1.PSRSgiaAG3bIpBZl\r\ndebug2: fd 4 setting O_NONBLOCK\r\ndebug3: fd 4 is O_NONBLOCK\r\ndebug3: fd 4 is O_NONBLOCK\r\ndebug1: channel 0: new [/root/.ansible/cp/d4b42411f1]\r\ndebug3: muxserver_listen: mux listener channel 0 fd 4\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 14377\r\ndebug2: fd 4 setting O_NONBLOCK\r\ndebug1: forking to background\r\ndebug1: Entering interactive session.\r\ndebug1: pledge: id\r\ndebug2: set_control_persist_exit_time: schedule exit in 60 seconds\r\ndebug1: multiplexing control connection\r\ndebug2: fd 5 setting O_NONBLOCK\r\ndebug3: fd 5 is O_NONBLOCK\r\ndebug1: channel 1: new [mux-control]\r\ndebug3: channel_post_mux_listener: new mux channel 1 fd 5\r\ndebug3: mux_master_read_cb: channel 1: hello sent\r\ndebug2: set_control_persist_exit_time: cancel scheduled exit\r\ndebug3: mux_master_read_cb: channel 1 packet type 0x00000001 len 4\r\ndebug2: 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 = 14379\r\ndebug3: mux_client_request_session: session request sent\r\ndebug3: mux_master_read_cb: channel 1 packet type 0x10000002 len 95\r\ndebug2: process_mux_new_session: channel 1: request tty 0, X 0, agent 0, subsys 0, term "xterm", cmd "/bin/sh -c \'echo ~root &amp;&amp; sleep 0\'", env 1\r\ndebug3: process_mux_new_session: got fds stdin 6, stdout 7, stderr 8\r\ndebug2: fd 7 setting O_NONBLOCK\r\ndebug2: fd 8 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\ndebug3: send packet: type 90\r\ndebug3: receive packet: type 80\r\ndebug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0\r\ndebug3: receive packet: type 91\r\ndebug2: callback start\r\ndebug2: client_session2_setup: id 2\r\ndebug1: Sending environment.\r\ndebug1: Sending env LANG = en_US.UTF-8\r\ndebug2: channel 2: request env confirm 0\r\ndebug3: send packet: type 98\r\ndebug1: Sending command: /bin/sh -c \'echo ~root &amp;&amp; sleep 0\'\r\ndebug2: channel 2: request exec confirm 1\r\ndebug3: send packet: type 98\r\ndebug3: mux_session_confirm: sending success reply\r\ndebug2: callback done\r\ndebug2: channel 2: open confirm rwindow 0 rmax 32768\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug2: channel 2: rcvd adjust 2097152\r\ndebug3: receive packet: type 99\r\ndebug2: channel_input_status_confirm: type 99 id 2\r\ndebug2: exec request accepted on channel 2\r\ndebug3: receive packet: type 96\r\ndebug2: channel 2: rcvd eof\r\ndebug2: channel 2: output open -> drain\r\ndebug2: channel 2: obuf empty\r\ndebug2: channel 2: close_write\r\ndebug2: channel 2: output drain -> closed\r\ndebug3: receive packet: type 98\r\ndebug1: client_input_channel_req: channel 2 rtype exit-status reply 0\r\ndebug3: mux_exit_message: channel 2: exit message, exitval 0\r\ndebug3: receive packet: type 98\r\ndebug1: client_input_channel_req: channel 2 rtype eow@openssh.com reply 0\r\ndebug2: channel 2: rcvd eow\r\ndebug2: channel 2: close_read\r\ndebug2: channel 2: input open -> closed\r\ndebug3: receive packet: type 97\r\ndebug2: channel 2: rcvd close\r\ndebug3: channel 2: will not send data after close\r\ndebug2: channel 2: send close\r\ndebug3: send packet: type 97\r\ndebug2: channel 2: is dead\r\ndebug2: channel 2: gc: notify user\r\ndebug3: mux_master_session_cleanup_cb: entering for channel 2\r\ndebug2: channel 1: rcvd close\r\ndebug2: channel 1: output open -> drain\r\ndebug2: 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  #1 mux-control (t16 r-1 i3/0 o1/16 fd 5/5 cc -1)\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\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug1: channel 1: free: mux-control, nchannels 2\r\ndebug3: channel 1: status: The following connections are open:\r\n  #1 mux-control (t16 r-1 i3/0 o3/0 fd 5/5 cc -1)\r\n\r\ndebug2: Received exit status from master 0\r\ndebug2: set_control_persist_exit_time: schedule exit in 60 seconds\r\n')
<sles15test> ESTABLISH SSH CONNECTION FOR USER: root
<sles15test> SSH: EXEC sshpass -d12 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o User=root -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/d4b42411f1 sles15test '/bin/sh -c '"'"'( umask 77 &amp;&amp; mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1529943768.68-280975680299773 `" &amp;&amp; echo ansible-tmp-1529943768.68-280975680299773="` echo /root/.ansible/tmp/ansible-tmp-1529943768.68-280975680299773 `" ) &amp;&amp; sleep 0'"'"''
<sles15test> (0, 'ansible-tmp-1529943768.68-280975680299773=/root/.ansible/tmp/ansible-tmp-1529943768.68-280975680299773\n', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: 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 = 14379\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')
<sles15test> PUT /root/.ansible/tmp/ansible-local-143647TYeX7/tmpMR794O TO /root/.ansible/tmp/ansible-tmp-1529943768.68-280975680299773/setup.py
<sles15test> SSH: EXEC sshpass -d12 sftp -o BatchMode=no -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o User=root -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/d4b42411f1 '[sles15test]'
<sles15test> (0, 'sftp> put /root/.ansible/tmp/ansible-local-143647TYeX7/tmpMR794O /root/.ansible/tmp/ansible-tmp-1529943768.68-280975680299773/setup.py\n', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: 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 = 14379\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 5 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -> /root size 0\r\ndebug3: Looking up /root/.ansible/tmp/ansible-local-143647TYeX7/tmpMR794O\r\ndebug3: Sent message fd 5 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:/root/.ansible/tmp/ansible-tmp-1529943768.68-280975680299773/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:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:8 O:131072 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:9 O:163840 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:10 O:196608 S:7796\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 32768 bytes at 98304\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 8 32768 bytes at 131072\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 9 32768 bytes at 163840\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 10 7796 bytes at 196608\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')
<sles15test> ESTABLISH SSH CONNECTION FOR USER: root
<sles15test> SSH: EXEC sshpass -d12 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o User=root -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/d4b42411f1 sles15test '/bin/sh -c '"'"'chmod u+x /root/.ansible/tmp/ansible-tmp-1529943768.68-280975680299773/ /root/.ansible/tmp/ansible-tmp-1529943768.68-280975680299773/setup.py &amp;&amp; sleep 0'"'"''
<sles15test> (0, '', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: 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 = 14379\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')
<sles15test> ESTABLISH SSH CONNECTION FOR USER: root
<sles15test> SSH: EXEC sshpass -d12 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o User=root -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/d4b42411f1 -tt sles15test '/bin/sh -c '"'"'/usr/bin/python3 /root/.ansible/tmp/ansible-tmp-1529943768.68-280975680299773/setup.py &amp;&amp; sleep 0'"'"''
<sles15test> (0, '\r\n{"ansible_facts": {"ansible_system": "Linux", "ansible_kernel": "4.12.14-23-default", "ansible_machine": "x86_64", "ansible_python_version": "3.6.5", "ansible_fqdn": "localhost", "ansible_hostname": "localhost", "ansible_nodename": "localhost", "ansible_domain": "", "ansible_userspace_bits": "64", "ansible_architecture": "x86_64", "ansible_userspace_architecture": "x86_64", "ansible_machine_id": "d2140086856f48f7a7c3f891345a2462", "ansible_user_id": "root", "ansible_user_uid": 0, "ansible_user_gid": 0, "ansible_user_gecos": "root", "ansible_user_dir": "/root", "ansible_user_shell": "/bin/bash", "ansible_real_user_id": 0, "ansible_effective_user_id": 0, "ansible_real_group_id": 0, "ansible_effective_group_id": 0, "ansible_apparmor": {"status": "enabled"}, "ansible_local": {}, "ansible_ssh_host_key_dsa_public": "AAAAB3NzaC1kc3MAAACBAIW5ANISI02Xg6Y6Cg/QjB51vDHHz20qrFe0bUmNcsNztnIgSz37Oik9i9sXLMsThjYFQxwP9GcDg0+T1s00iUyylnMVi9TcDwaOddYU3NkTc1YRUIM2MF6UX5RsDyhXGQp/mZDjdm/NZqKMWJ1Y0rNl6KGSjnwjYijRD+favTKFAAAAFQCwV3J8QDQnsPyELDuGp9dtJE5vuQAAAIAMyqKN/hRw0DLzPCROqZtk/o1fK6d25kDO/JGsTT09Ua+BBBw6N7pLgFVsZu8VQW2TXDD9kkg59FYxgaKQRVxpVLW8I3J1T4Ps00oFS1aFtNbf1tTtS+JUq6staocS/BLolafzHpPKtVIKjI20wMEa0bhQ1sILRneaSFcwbspJgwAAAIBC9AMKGM1Q4umQ2rEDdebHG+p8jCix5wvX9h0hJqy0csENQpj8HP+Nze3A1tnwUjzbi5xWK0Bm1mgrFgrja6OFE7WTc/8DdtAArUc36VNNc9ZCmoQe943GDFxRHaxCnnYWab7jCnmr98cBb5BKSHzA5h+gZ/C7T6XPHXuYwwzE3g==", "ansible_ssh_host_key_rsa_public": "AAAAB3NzaC1yc2EAAAADAQABAAABAQCpZHGIXYA6XRO/CNfJM9i+sWspYIxwDHMxS8YSXUsDp2uoXVmBpuvTNDewhyie8x4Xhc5DycDxu4Y1LuLDQz/+vNh8UPWqt9fs/vr9w1lWzo4m61aUh56vRDGEpMwoTrs2hNxqoWFbhztMW5YRg09A8Sz7chQktPpiEvLNzMS6JwG7OeYCE+IpU2d2K6ZVKapl8/JdyqaoOoez3DvjB7wzgBzb9D67073UTMXJJqHX0/TknpyBAp8Hif/U3F+GdhkWwLJw5CWT5X9ubxQkj5IPR/Kbfyg6A79bwpgKTsoiWbifm+Vuc+/RfSgp5Di3EaP1l6DiegIixMRfCeS49thF", "ansible_ssh_host_key_ecdsa_public": "AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPTZxW9a0+tP9R0ShBQewCjk/rNVS0cTMYWm36OfJn5Z6oVMJfATs0EPiy9qk31UHRRyiJk4oIV3hpXcb63lVw8=", "ansible_ssh_host_key_ed25519_public": "AAAAC3NzaC1lZDI1NTE5AAAAIHoTRU3FycNhe8O4JJehjy6Cttz0LGGzXhmpBTfhMnlo", "ansible_dns": {"search": ["sanitized.local.domain"], "nameservers": ["sanitized.ip..143", "sanitized.ip..144"]}, "ansible_python": {"version": {"major": 3, "minor": 6, "micro": 5, "releaselevel": "final", "serial": 0}, "version_info": [3, 6, 5, "final", 0], "executable": "/usr/bin/python3", "has_sslcontext": true, "type": "cpython"}, "ansible_env": {"HOSTTYPE": "x86_64", "SSH_CONNECTION": "192.168.71.124 50936 sles15test 22", "XKEYSYMDB": "/usr/X11R6/lib/X11/XKeysymDB", "_": "/usr/bin/python3", "LANG": "en_US.UTF-8", "WINDOWMANAGER": "xterm", "HOSTNAME": "localhost", "CSHEDIT": "emacs", "GPG_TTY": "/dev/pts/1", "COLORTERM": "1", "MACHTYPE": "x86_64-suse-linux", "MINICOM": "-c on", "OSTYPE": "linux", "XDG_SESSION_ID": "4", "USER": "root", "PWD": "/root", "HOME": "/root", "HOST": "localhost", "SSH_CLIENT": "192.168.71.124 50936 22", "XNLSPATH": "/usr/X11R6/lib/X11/nls", "XDG_DATA_DIRS": "/usr/share", "LIBGL_DEBUG": "quiet", "PROFILEREAD": "true", "SSH_TTY": "/dev/pts/1", "FROM_HEADER": "", "MAIL": "/var/mail/root", "SHELL": "/bin/bash", "TERM": "xterm", "SHLVL": "2", "G_FILENAME_ENCODING": "@locale,UTF-8,ISO-8859-15,CP1252", "MANPATH": "", "LOGNAME": "root", "DBUS_SESSION_BUS_ADDRESS": "unix:path=/run/user/0/bus", "XDG_RUNTIME_DIR": "/run/user/0", "XDG_CONFIG_DIRS": "/etc/xdg", "PATH": "/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin", "G_BROKEN_FILENAMES": "1", "HISTSIZE": "1000", "CPU": "x86_64", "SSH_SENDS_LOCALE": "yes", "PYTHONPATH": "/tmp/ansible_g82rdccz/ansible_modlib.zip"}, "ansible_distribution": "SLES", "ansible_distribution_release": "0", "ansible_distribution_version": "15", "ansible_distribution_major_version": "NA", "ansible_distribution_file_path": "/etc/os-release", "ansible_distribution_file_variety": "SUSE", "ansible_distribution_file_parsed": true, "ansible_os_family": "Suse", "ansible_virtualization_type": "VMware", "ansible_virtualization_role": "guest", "ansible_fips": false, "ansible_selinux": {"status": "Missing selinux Python library"}, "ansible_selinux_python_present": false, "ansible_is_chroot": false, "ansible_date_time": {"year": "2018", "month": "06", "weekday": "Monday", "weekday_number": "1", "weeknumber": "26", "day": "25", "hour": "16", "minute": "24", "second": "20", "epoch": "1529943860", "date": "2018-06-25", "time": "16:24:20", "iso8601_micro": "2018-06-25T16:24:20.020895Z", "iso8601": "2018-06-25T16:24:20Z", "iso8601_basic": "20180625T162420020749", "iso8601_basic_short": "20180625T162420", "tz": "UTC", "tz_offset": "+0000"}, "ansible_interfaces": ["eth0", "lo"], "ansible_eth0": {"device": "eth0", "macaddress": "00:50:56:85:1a:03", "mtu": 1500, "active": true, "module": "vmxnet3", "type": "ether", "pciid": "0000:0b:00.0", "speed": 10000, "promisc": false, "ipv4": {"address": "sles15test", "broadcast": "192.168.255.255", "netmask": "255.255.0.0", "network": "192.168.0.0"}, "ipv6": [{"address": "fe80::250:56ff:fe85:1a03", "prefix": "64", "scope": "link"}]}, "ansible_lo": {"device": "lo", "mtu": 65536, "active": true, "type": "loopback", "promisc": false, "ipv4": {"address": "127.0.0.1", "broadcast": "host", "netmask": "255.0.0.0", "network": "127.0.0.0"}, "ipv6": [{"address": "::1", "prefix": "128", "scope": "host"}]}, "ansible_default_ipv4": {"gateway": "192.168.71.1", "interface": "eth0", "address": "sles15test", "broadcast": "192.168.255.255", "netmask": "255.255.0.0", "network": "192.168.0.0", "macaddress": "00:50:56:85:1a:03", "mtu": 1500, "type": "ether", "alias": "eth0"}, "ansible_default_ipv6": {}, "ansible_all_ipv4_addresses": ["sles15test"], "ansible_all_ipv6_addresses": ["fe80::250:56ff:fe85:1a03"], "ansible_cmdline": {"BOOT_IMAGE": "/boot/vmlinuz-4.12.14-23-default", "root": "UUID=be93e296-7f4a-4136-a027-89801318fc01", "resume": "/dev/disk/by-path/pci-0000:03:00.0-scsi-0:0:0:0-part3", "splash": "silent", "quiet": true, "showopts": true, "crashkernel": "72M,low"}, "ansible_pkg_mgr": "zypper", "ansible_lsb": {}, "ansible_processor": ["0", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz", "1", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz", "2", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz", "3", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz"], "ansible_processor_count": 4, "ansible_processor_cores": 1, "ansible_processor_threads_per_core": 1, "ansible_processor_vcpus": 4, "ansible_memtotal_mb": 7730, "ansible_memfree_mb": 7321, "ansible_swaptotal_mb": 7969, "ansible_swapfree_mb": 7969, "ansible_memory_mb": {"real": {"total": 7730, "used": 409, "free": 7321}, "nocache": {"free": 7551, "used": 179}, "swap": {"total": 7969, "free": 7969, "used": 0, "cached": 0}}, "ansible_bios_date": "09/17/2015", "ansible_bios_version": "6.00", "ansible_form_factor": "Other", "ansible_product_name": "VMware Virtual Platform", "ansible_product_serial": "VMware-42 05 6b cd da 5f eb de-4f 17 9c 03 34 18 15 46", "ansible_product_uuid": "42056BCD-DA5F-EBDE-4F17-9C0334181546", "ansible_product_version": "None", "ansible_system_vendor": "VMware, Inc.", "ansible_devices": {"sr0": {"virtual": 1, "links": {"ids": ["ata-VMware_Virtual_IDE_CDROM_Drive_10000000000000000001"], "uuids": [], "labels": [], "masters": []}, "vendor": "NECVMWar", "model": "VMware IDE CDR10", "sas_address": null, "sas_device_handle": null, "removable": "1", "support_discard": "0", "partitions": {}, "rotational": "1", "scheduler_mode": "cfq", "sectors": "2097151", "sectorsize": "512", "size": "1024.00 MB", "host": "IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)", "holders": []}, "fd0": {"virtual": 1, "links": {"ids": [], "uuids": [], "labels": [], "masters": []}, "vendor": null, "model": null, "sas_address": null, "sas_device_handle": null, "removable": "1", "support_discard": "0", "partitions": {}, "rotational": "1", "scheduler_mode": "cfq", "sectors": "8", "sectorsize": "512", "size": "4.00 KB", "host": "", "holders": []}, "sda": {"virtual": 1, "links": {"ids": [], "uuids": [], "labels": [], "masters": []}, "vendor": "VMware", "model": "Virtual disk", "sas_address": null, "sas_device_handle": null, "removable": "0", "support_discard": "0", "partitions": {"sda2": {"links": {"ids": [], "uuids": ["be93e296-7f4a-4136-a027-89801318fc01"], "labels": [], "masters": []}, "start": "18432", "sectors": "319203328", "sectorsize": 512, "size": "152.21 GB", "uuid": "be93e296-7f4a-4136-a027-89801318fc01", "holders": []}, "sda3": {"links": {"ids": [], "uuids": ["9890a812-969a-4721-94e9-468eaf4abb24"], "labels": [], "masters": []}, "start": "319221760", "sectors": "16322527", "sectorsize": 512, "size": "7.78 GB", "uuid": "9890a812-969a-4721-94e9-468eaf4abb24", "holders": []}, "sda1": {"links": {"ids": [], "uuids": [], "labels": [], "masters": []}, "start": "2048", "sectors": "16384", "sectorsize": 512, "size": "8.00 MB", "uuid": null, "holders": []}}, "rotational": "1", "scheduler_mode": "cfq", "sectors": "335544320", "sectorsize": "512", "size": "160.00 GB", "host": "Serial Attached SCSI controller: VMware PVSCSI SCSI Controller (rev 02)", "holders": []}}, "ansible_device_links": {"ids": {"sr0": ["ata-VMware_Virtual_IDE_CDROM_Drive_10000000000000000001"]}, "uuids": {"sda2": ["be93e296-7f4a-4136-a027-89801318fc01"], "sda3": ["9890a812-969a-4721-94e9-468eaf4abb24"]}, "labels": {}, "masters": {}}, "ansible_uptime_seconds": 810, "ansible_mounts": [{"mount": "/", "device": "/dev/sda2", "fstype": "ext4", "options": "rw,relatime,data=ordered", "uuid": "be93e296-7f4a-4136-a027-89801318fc01", "size_total": 159792762880, "size_available": 149775474688, "block_size": 4096, "block_total": 39011905, "block_available": 36566278, "block_used": 2445627, "inode_total": 9977856, "inode_available": 9929021, "inode_used": 48835}], "ansible_service_mgr": "systemd", "gather_subset": ["all"], "module_setup": true}, "invocation": {"module_args": {"gather_timeout": 10, "gather_subset": ["all"], "filter": "*", "fact_path": "/etc/ansible/facts.d"}}}\r\n', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: 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 = 14379\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 sles15test closed.\r\n')
<sles15test> ESTABLISH SSH CONNECTION FOR USER: root
<sles15test> SSH: EXEC sshpass -d12 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o User=root -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/d4b42411f1 sles15test '/bin/sh -c '"'"'rm -f -r /root/.ansible/tmp/ansible-tmp-1529943768.68-280975680299773/ > /dev/null 2>&amp;1 &amp;&amp; sleep 0'"'"''
<sles15test> (0, '', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: 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 = 14379\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')
ok: [sles15test]
META: ran handlers

TASK [install packages] ********************************************************************************
task path: /Maintenance/ansibuild/bug.yaml:6
Running zypper
Using module file /usr/lib/python2.7/site-packages/ansible/modules/packaging/os/zypper.py
<sles15test> ESTABLISH SSH CONNECTION FOR USER: root
<sles15test> SSH: EXEC sshpass -d12 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o User=root -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/d4b42411f1 sles15test '/bin/sh -c '"'"'echo ~root &amp;&amp; sleep 0'"'"''
<sles15test> (0, '/root\n', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: 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 = 14379\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')
<sles15test> ESTABLISH SSH CONNECTION FOR USER: root
<sles15test> SSH: EXEC sshpass -d12 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o User=root -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/d4b42411f1 sles15test '/bin/sh -c '"'"'( umask 77 &amp;&amp; mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1529943771.79-21333467626262 `" &amp;&amp; echo ansible-tmp-1529943771.79-21333467626262="` echo /root/.ansible/tmp/ansible-tmp-1529943771.79-21333467626262 `" ) &amp;&amp; sleep 0'"'"''
<sles15test> (0, 'ansible-tmp-1529943771.79-21333467626262=/root/.ansible/tmp/ansible-tmp-1529943771.79-21333467626262\n', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: 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 = 14379\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')
<sles15test> PUT /root/.ansible/tmp/ansible-local-143647TYeX7/tmpxj86LE TO /root/.ansible/tmp/ansible-tmp-1529943771.79-21333467626262/zypper.py
<sles15test> SSH: EXEC sshpass -d12 sftp -o BatchMode=no -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o User=root -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/d4b42411f1 '[sles15test]'
<sles15test> (0, 'sftp> put /root/.ansible/tmp/ansible-local-143647TYeX7/tmpxj86LE /root/.ansible/tmp/ansible-tmp-1529943771.79-21333467626262/zypper.py\n', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: 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 = 14379\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 5 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -> /root size 0\r\ndebug3: Looking up /root/.ansible/tmp/ansible-local-143647TYeX7/tmpxj86LE\r\ndebug3: Sent message fd 5 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:/root/.ansible/tmp/ansible-tmp-1529943771.79-21333467626262/zypper.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:5005\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 5005 bytes at 65536\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')
<sles15test> ESTABLISH SSH CONNECTION FOR USER: root
<sles15test> SSH: EXEC sshpass -d12 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o User=root -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/d4b42411f1 sles15test '/bin/sh -c '"'"'chmod u+x /root/.ansible/tmp/ansible-tmp-1529943771.79-21333467626262/ /root/.ansible/tmp/ansible-tmp-1529943771.79-21333467626262/zypper.py &amp;&amp; sleep 0'"'"''
<sles15test> (0, '', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: 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 = 14379\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')
<sles15test> ESTABLISH SSH CONNECTION FOR USER: root
<sles15test> SSH: EXEC sshpass -d12 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o User=root -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/d4b42411f1 -tt sles15test '/bin/sh -c '"'"'/usr/bin/python3 /root/.ansible/tmp/ansible-tmp-1529943771.79-21333467626262/zypper.py &amp;&amp; sleep 0'"'"''
<sles15test> (1, 'Traceback (most recent call last):\r\n  File "/tmp/ansible_pckeab60/ansible_module_zypper.py", line 519, in <module>\r\n    main()\r\n  File "/tmp/ansible_pckeab60/ansible_module_zypper.py", line 514, in main\r\n    module.exit_json(name=name, state=state, update_cache=update_cache, **retvals)\r\n  File "/tmp/ansible_pckeab60/ansible_modlib.zip/ansible/module_utils/basic.py", line 2309, in exit_json\r\n  File "/tmp/ansible_pckeab60/ansible_modlib.zip/ansible/module_utils/basic.py", line 2302, in _return_formatted\r\n  File "/tmp/ansible_pckeab60/ansible_modlib.zip/ansible/module_utils/basic.py", line 517, in remove_values\r\n  File "/tmp/ansible_pckeab60/ansible_modlib.zip/ansible/module_utils/basic.py", line 500, in _remove_values_conditions\r\nTypeError: Value of unknown type: <class \'filter\'>, <filter object at 0x7f9c9c986b70>\r\n', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: 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 = 14379\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 1\r\nShared connection to sles15test closed.\r\n')
<sles15test> ESTABLISH SSH CONNECTION FOR USER: root
<sles15test> SSH: EXEC sshpass -d12 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o User=root -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/d4b42411f1 sles15test '/bin/sh -c '"'"'rm -f -r /root/.ansible/tmp/ansible-tmp-1529943771.79-21333467626262/ > /dev/null 2>&amp;1 &amp;&amp; sleep 0'"'"''
<sles15test> (0, '', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: 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 = 14379\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')
fatal: [sles15test]: FAILED! => {
"changed": false,
"module_stderr": "OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: 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 = 14379\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 1\r\nShared connection to sles15test closed.\r\n",
"module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_pckeab60/ansible_module_zypper.py\", line 519, in <module>\r\n    main()\r\n  File \"/tmp/ansible_pckeab60/ansible_module_zypper.py\", line 514, in main\r\n    module.exit_json(name=name, state=state, update_cache=update_cache, **retvals)\r\n  File \"/tmp/ansible_pckeab60/ansible_modlib.zip/ansible/module_utils/basic.py\", line 2309, in exit_json\r\n  File \"/tmp/ansible_pckeab60/ansible_modlib.zip/ansible/module_utils/basic.py\", line 2302, in _return_formatted\r\n  File \"/tmp/ansible_pckeab60/ansible_modlib.zip/ansible/module_utils/basic.py\", line 517, in remove_values\r\n  File \"/tmp/ansible_pckeab60/ansible_modlib.zip/ansible/module_utils/basic.py\", line 500, in _remove_values_conditions\r\nTypeError: Value of unknown type: <class 'filter'>, <filter object at 0x7f9c9c986b70>\r\n",
"msg": "MODULE FAILURE",
"rc": 1
}
to retry, use: --limit @/Maintenance/ansibuild/bug.retry

PLAY RECAP *********************************************************************************************
sles15test              : ok=1    changed=0    unreachable=0    failed=1

# Fixed code
def main():
    module = AnsibleModule(
        argument_spec=dict(
            name=dict(required=True, aliases=["pkg"], type="list"),
            state=dict(
                required=False,
                default="present",
                choices=[
                    "absent",
                    "installed",
                    "latest",
                    "present",
                    "removed",
                    "dist-upgrade",
                ],
            ),
            type=dict(
                required=False,
                default="package",
                choices=[
                    "package",
                    "patch",
                    "pattern",
                    "product",
                    "srcpackage",
                    "application",
                ],
            ),
            extra_args_precommand=dict(required=False, default=None),
            disable_gpg_check=dict(required=False, default="no", type="bool"),
            disable_recommends=dict(required=False, default="yes", type="bool"),
            force=dict(required=False, default="no", type="bool"),
            update_cache=dict(
                required=False, aliases=["refresh"], default="no", type="bool"
            ),
            oldpackage=dict(required=False, default="no", type="bool"),
            extra_args=dict(required=False, default=None),
        ),
        supports_check_mode=True,
    )

    name = module.params["name"]
    state = module.params["state"]
    update_cache = module.params["update_cache"]

    # remove empty strings from package list
    name = list(filter(None, name))

    # Refresh repositories
    if update_cache and not module.check_mode:
        retvals = repo_refresh(module)

        if retvals["rc"] != 0:
            module.fail_json(msg="Zypper refresh run failed.", **retvals)

    # Perform requested action
    if name == ["*"] and state in ["latest", "dist-upgrade"]:
        packages_changed, retvals = package_update_all(module)
    elif name != ["*"] and state == "dist-upgrade":
        module.fail_json(msg="Can not dist-upgrade specific packages.")
    else:
        if state in ["absent", "removed"]:
            packages_changed, retvals = package_absent(module, name)
        elif state in ["installed", "present", "latest"]:
            packages_changed, retvals = package_present(module, name, state == "latest")

    retvals["changed"] = retvals["rc"] == 0 and bool(packages_changed)

    if module._diff:
        set_diff(module, retvals, packages_changed)

    if retvals["rc"] != 0:
        module.fail_json(msg="Zypper run failed.", **retvals)

    if not retvals["changed"]:
        del retvals["stdout"]
        del retvals["stderr"]

    module.exit_json(name=name, state=state, update_cache=update_cache, **retvals)