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
63.02k stars 23.92k forks source link

EdgeOS commands not working on firmware 1.10.1 (EdgeRouter 6P) #39499

Closed mwegrzynek closed 6 years ago

mwegrzynek commented 6 years ago
ISSUE TYPE
COMPONENT NAME

edgeos_facts

ANSIBLE VERSION
ansible 2.5.1
  config file = /home/redacted_username/.ansible.cfg
  configured module search path = [u'/home/redacted_username/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.14 (default, Jan  5 2018, 10:41:29) [GCC 7.2.1 20171224]
CONFIGURATION

ANSIBLE_PIPELINING(/home/redacted_username/.ansible.cfg) = True CACHE_PLUGIN(/home/redacted_username/.ansible.cfg) = jsonfile CACHE_PLUGIN_CONNECTION(/home/redacted_username/.ansible.cfg) = /home/redacted_username/Projekty/Ansible/cache/facts CACHE_PLUGIN_TIMEOUT(/home/redacted_username/.ansible.cfg) = 86400 DEFAULT_GATHERING(/home/redacted_username/.ansible.cfg) = smart DEFAULT_HOST_LIST(/home/redacted_username/.ansible.cfg) = [u'/home/redacted_username/Projekty/Ansible/hosts'] DEFAULT_REMOTE_USER(/home/redacted_username/.ansible.cfg) = root DEFAULT_VAULT_PASSWORD_FILE(/home/redacted_username/.ansible.cfg) = /home/redacted_username/.vault-pass

OS / ENVIRONMENT

Ansible is running on Arch, the target is an Edge Router 6P running firmware version 1.10.1

SUMMARY

I'm not able to execute any commands on an EdgeRouter 6P (even edgeos_facts is not working). Seems like a permission/aufs related problem, but I wasn't able to debug it myself.

STEPS TO REPRODUCE
ansible er-03.redacted.domain.com -vvvvv -m edgeos_facts -u redacted_username
EXPECTED RESULTS

A reply with a list of facts regarding the EdgeRouter 6P

ACTUAL RESULTS
ansible 2.5.1
  config file = /home/redacted_username/.ansible.cfg
  configured module search path = [u'/home/redacted_username/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.14 (default, Jan  5 2018, 10:41:29) [GCC 7.2.1 20171224]
Using /home/redacted_username/.ansible.cfg as config file
Reading vault password file: /home/redacted_username/.vault-pass
setting up inventory plugins
Set default localhost to localhost
Parsed /home/redacted_username/Projekty/Ansible/hosts/hosts inventory source with ini plugin
 [ERROR]:

Parsed /home/redacted_username/Projekty/Ansible/hosts/logsystem.py inventory source with script plugin
Loading callback plugin minimal of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/minimal.pyc
META: ran handlers
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/network/__init__.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/basic.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/network/edgeos/edgeos.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/network/edgeos/__init__.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/six/__init__.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/_text.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/parsing/convert_bool.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/parsing/__init__.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/pycompat24.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/connection.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/network/common/__init__.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/network/common/utils.py
Using module file /usr/lib/python2.7/site-packages/ansible/modules/network/edgeos/edgeos_facts.py
<er-03.redacted.domain.com> ESTABLISH SSH CONNECTION FOR USER: redacted_username
<er-03.redacted.domain.com> SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<er-03.redacted.domain.com> SSH: ANSIBLE_REMOTE_PORT/remote_port/ansible_port set: (-o)(Port=2022)
<er-03.redacted.domain.com> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<er-03.redacted.domain.com> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=redacted_username)
<er-03.redacted.domain.com> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<er-03.redacted.domain.com> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/redacted_username/.ansible/cp/f38dda978f)
<er-03.redacted.domain.com> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o Port=2022 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=redacted_username -o ConnectTimeout=10 -o ControlPath=/home/redacted_username/.ansible/cp/f38dda978f er-03.redacted.domain.com '/bin/sh -c '"'"'/usr/bin/python && sleep 0'"'"''
<er-03.redacted.domain.com> (1, '', 'OpenSSH_7.7p1, OpenSSL 1.1.0h  27 Mar 2018\r\ndebug1: Reading configuration data /home/redacted_username/.ssh/config\r\ndebug1: /home/redacted_username/.ssh/config line 1: Applying options for er-03.redacted.domain.com\r\ndebug1: /home/redacted_username/.ssh/config line 4: Applying options for er-*\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 20: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: Control socket "/home/redacted_username/.ansible/cp/f38dda978f" does not exist\r\ndebug2: resolving "er-03.redacted.domain.com" port 2022\r\ndebug2: ssh_connect_direct: needpriv 0\r\ndebug1: Connecting to er-03.redacted.domain.com [172.24.0.254] port 2022.\r\ndebug2: fd 4 setting O_NONBLOCK\r\ndebug1: fd 4 clearing O_NONBLOCK\r\ndebug1: Connection established.\r\ndebug3: timeout: 9923 ms remain after connect\r\ndebug1: identity file /home/redacted_username/.ssh/id_rsa type 0\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/redacted_username/.ssh/id_rsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/redacted_username/.ssh/id_dsa type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/redacted_username/.ssh/id_dsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/redacted_username/.ssh/id_ecdsa type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/redacted_username/.ssh/id_ecdsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/redacted_username/.ssh/id_ed25519 type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/redacted_username/.ssh/id_ed25519-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/redacted_username/.ssh/id_xmss type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/redacted_username/.ssh/id_xmss-cert type -1\r\ndebug1: Local version string SSH-2.0-OpenSSH_7.7\r\ndebug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Debian-4~bpo70+1\r\ndebug1: match: OpenSSH_6.6.1p1 Debian-4~bpo70+1 pat OpenSSH_6.6.1* compat 0x04000000\r\ndebug2: fd 4 setting O_NONBLOCK\r\ndebug1: Authenticating to er-03.redacted.domain.com:2022 as \'redacted_username\'\r\ndebug3: put_host_port: [er-03.redacted.domain.com]:2022\r\ndebug3: hostkeys_foreach: reading file "/home/redacted_username/.ssh/known_hosts"\r\ndebug3: record_hostkey: found key type ECDSA in file /home/redacted_username/.ssh/known_hosts:566\r\ndebug3: load_hostkeys: loaded 1 keys from [er-03.redacted.domain.com]:2022\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,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-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa\r\ndebug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com\r\ndebug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com\r\ndebug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: compression ctos: zlib@openssh.com,zlib,none\r\ndebug2: compression stoc: zlib@openssh.com,zlib,none\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first_kex_follows 0 \r\ndebug2: reserved 0 \r\ndebug2: peer server KEXINIT proposal\r\ndebug2: KEX algorithms: curve25519-sha256@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: host key algorithms: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519\r\ndebug2: ciphers ctos: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se\r\ndebug2: ciphers stoc: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se\r\ndebug2: MACs ctos: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96\r\ndebug2: MACs stoc: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96\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@libssh.org\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\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:fnAEblp0bv3EFijp9FcY41x6N5biAoa5fuEkZTE94Og\r\ndebug3: put_host_port: [172.24.0.254]:2022\r\ndebug3: put_host_port: [er-03.redacted.domain.com]:2022\r\ndebug3: hostkeys_foreach: reading file "/home/redacted_username/.ssh/known_hosts"\r\ndebug3: record_hostkey: found key type ECDSA in file /home/redacted_username/.ssh/known_hosts:566\r\ndebug3: load_hostkeys: loaded 1 keys from [er-03.redacted.domain.com]:2022\r\ndebug3: hostkeys_foreach: reading file "/home/redacted_username/.ssh/known_hosts"\r\ndebug3: record_hostkey: found key type ECDSA in file /home/redacted_username/.ssh/known_hosts:547\r\ndebug3: load_hostkeys: loaded 1 keys from [172.24.0.254]:2022\r\ndebug1: Host \'[er-03.redacted.domain.com]:2022\' is known and matches the ECDSA host key.\r\ndebug1: Found key in /home/redacted_username/.ssh/known_hosts:566\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: /home/redacted_username/.ssh/id_rsa (0x55793b83fd40), agent\r\ndebug2: key: /home/redacted_username/.ssh/id_dsa ((nil))\r\ndebug2: key: /home/redacted_username/.ssh/id_ecdsa ((nil))\r\ndebug2: key: /home/redacted_username/.ssh/id_ed25519 ((nil))\r\ndebug2: key: /home/redacted_username/.ssh/id_xmss ((nil))\r\ndebug3: send packet: type 5\r\ndebug3: receive packet: type 6\r\ndebug2: service_accept: ssh-userauth\r\ndebug1: SSH2_MSG_SERVICE_ACCEPT received\r\ndebug3: send packet: type 50\r\ndebug3: receive packet: type 53\r\ndebug3: input_userauth_banner\r\nWelcome to EdgeOS\n\nBy logging in, accessing, or using the Ubiquiti product, you\nacknowledge that you have read and understood the Ubiquiti\nLicense Agreement (available in the Web UI at, by default,\nhttp://192.168.1.1) and agree to be bound by its terms.\n\ndebug3: receive packet: type 51\r\ndebug1: Authentications that can continue: publickey,password\r\ndebug3: start over, passed a different list publickey,password\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 public key: RSA SHA256:J4C4Gfnr4KFPh+FBFNJ4Q5AW+9VdCkGcLT7inPhUIj8 /home/redacted_username/.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 60\r\ndebug1: Server accepts key: pkalg ssh-rsa blen 279\r\ndebug2: input_userauth_pk_ok: fp SHA256:J4C4Gfnr4KFPh+FBFNJ4Q5AW+9VdCkGcLT7inPhUIj8\r\ndebug3: sign_and_send_pubkey: RSA SHA256:J4C4Gfnr4KFPh+FBFNJ4Q5AW+9VdCkGcLT7inPhUIj8\r\ndebug3: send packet: type 50\r\ndebug3: receive packet: type 52\r\ndebug1: Enabling compression at level 6.\r\ndebug1: Authentication succeeded (publickey).\r\nAuthenticated to er-03.redacted.domain.com ([172.24.0.254]:2022).\r\ndebug1: setting up multiplex master socket\r\ndebug3: muxserver_listen: temporary control path /home/redacted_username/.ansible/cp/f38dda978f.xot2tVMH93ONxox2\r\ndebug2: fd 6 setting O_NONBLOCK\r\ndebug3: fd 6 is O_NONBLOCK\r\ndebug3: fd 6 is O_NONBLOCK\r\ndebug1: channel 0: new [/home/redacted_username/.ansible/cp/f38dda978f]\r\ndebug3: muxserver_listen: mux listener channel 0 fd 6\r\ndebug2: fd 4 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 11790\r\ndebug2: fd 6 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 7 setting O_NONBLOCK\r\ndebug3: fd 7 is O_NONBLOCK\r\ndebug1: channel 1: new [mux-control]\r\ndebug3: channel_post_mux_listener: new mux channel 1 fd 7\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 = 11792\r\ndebug3: mux_client_request_session: session request sent\r\ndebug3: mux_master_read_cb: channel 1 packet type 0x10000002 len 89\r\ndebug2: process_mux_new_session: channel 1: request tty 0, X 0, agent 0, subsys 0, term "xterm-256color", cmd "/bin/sh -c \'/usr/bin/python && sleep 0\'", env 0\r\ndebug3: process_mux_new_session: got fds stdin 8, stdout 9, stderr 10\r\ndebug2: fd 8 setting O_NONBLOCK\r\ndebug2: fd 9 setting O_NONBLOCK\r\ndebug2: fd 10 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 91\r\ndebug2: channel_input_open_confirmation: channel 2: callback start\r\ndebug2: client_session2_setup: id 2\r\ndebug1: Sending command: /bin/sh -c \'/usr/bin/python && sleep 0\'\r\ndebug2: channel 2: request exec confirm 1\r\ndebug3: send packet: type 98\r\ndebug3: mux_session_confirm: sending success reply\r\ndebug2: channel_input_open_confirmation: channel 2: callback done\r\ndebug2: channel 2: open confirm rwindow 0 rmax 32768\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug2: channel 2: rcvd adjust 2097152\r\ndebug3: receive packet: type 99\r\ndebug2: channel_input_status_confirm: type 99 id 2\r\ndebug2: exec request accepted on channel 2\r\ndebug2: channel 2: read<=0 rfd 8 len 0\r\ndebug2: channel 2: read failed\r\ndebug2: channel 2: close_read\r\ndebug2: channel 2: input open -> drain\r\ndebug2: channel 2: ibuf empty\r\ndebug2: channel 2: send eof\r\ndebug3: send packet: type 96\r\ndebug2: channel 2: input drain -> closed\r\ndebug2: channel 2: rcvd ext data 1015\r\nTraceback (most recent call last):\n  File "/tmp/ansible_0EIPLh/ansible_module_edgeos_facts.py", line 311, in <module>\n    main()\n  File "/tmp/ansible_0EIPLh/ansible_module_edgeos_facts.py", line 299, in main\n    inst.populate()\n  File "/tmp/ansible_0EIPLh/ansible_module_edgeos_facts.py", line 187, in populate\n    super(Neighbors, self).populate()\n  File "/tmp/ansible_0EIPLh/ansible_module_edgeos_facts.py", line 110, in populate\n    self.responses = run_commands(self.module, list(self.COMMANDS))\n  File "/tmp/ansible_0EIPLh/ansible_modlib.zip/ansible/module_utils/network/edgeos/edgeos.py", line 74, in run_commands\n  File "/tmp/ansible_0EIPLh/ansible_modlib.zip/ansible/module_utils/network/edgeos/edgeos.py", line 40, in get_connection\n  File "/tmp/ansible_0EIPLh/ansible_modlib.zip/ansible/module_utils/network/edgeos/edgeos.py", line 54, in get_capabilities\n  File "/tmp/ansible_0EIPLh/ansible_modlib.zip/ansible/module_utils/connection.py", line 98, in __init__\nAssertionError: socket_path must be a value\ndebug2: channel 2: written 1015 to efd 10\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 1\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 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 nr0 i3/0 o1/16 fd 7/7 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_client_read_packet: read header failed: Broken pipe\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: Received exit status from master 1\r\ndebug2: channel 1: garbage collecting\r\ndebug1: channel 1: free: mux-control, nchannels 2\r\ndebug3: channel 1: status: The following connections are open:\r\n  #1 mux-control (t16 nr0 i3/0 o3/0 fd 7/7 cc -1)\r\n\r\ndebug2: set_control_persist_exit_time: schedule exit in 60 seconds\r\n')
er-03.redacted.domain.com | FAILED! => {
    "changed": false, 
    "module_stderr": "OpenSSH_7.7p1, OpenSSL 1.1.0h  27 Mar 2018\r\ndebug1: Reading configuration data /home/redacted_username/.ssh/config\r\ndebug1: /home/redacted_username/.ssh/config line 1: Applying options for er-03.redacted.domain.com\r\ndebug1: /home/redacted_username/.ssh/config line 4: Applying options for er-*\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 20: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: Control socket \"/home/redacted_username/.ansible/cp/f38dda978f\" does not exist\r\ndebug2: resolving \"er-03.redacted.domain.com\" port 2022\r\ndebug2: ssh_connect_direct: needpriv 0\r\ndebug1: Connecting to er-03.redacted.domain.com [172.24.0.254] port 2022.\r\ndebug2: fd 4 setting O_NONBLOCK\r\ndebug1: fd 4 clearing O_NONBLOCK\r\ndebug1: Connection established.\r\ndebug3: timeout: 9923 ms remain after connect\r\ndebug1: identity file /home/redacted_username/.ssh/id_rsa type 0\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/redacted_username/.ssh/id_rsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/redacted_username/.ssh/id_dsa type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/redacted_username/.ssh/id_dsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/redacted_username/.ssh/id_ecdsa type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/redacted_username/.ssh/id_ecdsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/redacted_username/.ssh/id_ed25519 type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/redacted_username/.ssh/id_ed25519-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/redacted_username/.ssh/id_xmss type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/redacted_username/.ssh/id_xmss-cert type -1\r\ndebug1: Local version string SSH-2.0-OpenSSH_7.7\r\ndebug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Debian-4~bpo70+1\r\ndebug1: match: OpenSSH_6.6.1p1 Debian-4~bpo70+1 pat OpenSSH_6.6.1* compat 0x04000000\r\ndebug2: fd 4 setting O_NONBLOCK\r\ndebug1: Authenticating to er-03.redacted.domain.com:2022 as 'redacted_username'\r\ndebug3: put_host_port: [er-03.redacted.domain.com]:2022\r\ndebug3: hostkeys_foreach: reading file \"/home/redacted_username/.ssh/known_hosts\"\r\ndebug3: record_hostkey: found key type ECDSA in file /home/redacted_username/.ssh/known_hosts:566\r\ndebug3: load_hostkeys: loaded 1 keys from [er-03.redacted.domain.com]:2022\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,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-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa\r\ndebug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com\r\ndebug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com\r\ndebug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: compression ctos: zlib@openssh.com,zlib,none\r\ndebug2: compression stoc: zlib@openssh.com,zlib,none\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first_kex_follows 0 \r\ndebug2: reserved 0 \r\ndebug2: peer server KEXINIT proposal\r\ndebug2: KEX algorithms: curve25519-sha256@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: host key algorithms: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519\r\ndebug2: ciphers ctos: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se\r\ndebug2: ciphers stoc: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se\r\ndebug2: MACs ctos: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96\r\ndebug2: MACs stoc: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96\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@libssh.org\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\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:fnAEblp0bv3EFijp9FcY41x6N5biAoa5fuEkZTE94Og\r\ndebug3: put_host_port: [172.24.0.254]:2022\r\ndebug3: put_host_port: [er-03.redacted.domain.com]:2022\r\ndebug3: hostkeys_foreach: reading file \"/home/redacted_username/.ssh/known_hosts\"\r\ndebug3: record_hostkey: found key type ECDSA in file /home/redacted_username/.ssh/known_hosts:566\r\ndebug3: load_hostkeys: loaded 1 keys from [er-03.redacted.domain.com]:2022\r\ndebug3: hostkeys_foreach: reading file \"/home/redacted_username/.ssh/known_hosts\"\r\ndebug3: record_hostkey: found key type ECDSA in file /home/redacted_username/.ssh/known_hosts:547\r\ndebug3: load_hostkeys: loaded 1 keys from [172.24.0.254]:2022\r\ndebug1: Host '[er-03.redacted.domain.com]:2022' is known and matches the ECDSA host key.\r\ndebug1: Found key in /home/redacted_username/.ssh/known_hosts:566\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: /home/redacted_username/.ssh/id_rsa (0x55793b83fd40), agent\r\ndebug2: key: /home/redacted_username/.ssh/id_dsa ((nil))\r\ndebug2: key: /home/redacted_username/.ssh/id_ecdsa ((nil))\r\ndebug2: key: /home/redacted_username/.ssh/id_ed25519 ((nil))\r\ndebug2: key: /home/redacted_username/.ssh/id_xmss ((nil))\r\ndebug3: send packet: type 5\r\ndebug3: receive packet: type 6\r\ndebug2: service_accept: ssh-userauth\r\ndebug1: SSH2_MSG_SERVICE_ACCEPT received\r\ndebug3: send packet: type 50\r\ndebug3: receive packet: type 53\r\ndebug3: input_userauth_banner\r\nWelcome to EdgeOS\n\nBy logging in, accessing, or using the Ubiquiti product, you\nacknowledge that you have read and understood the Ubiquiti\nLicense Agreement (available in the Web UI at, by default,\nhttp://192.168.1.1) and agree to be bound by its terms.\n\ndebug3: receive packet: type 51\r\ndebug1: Authentications that can continue: publickey,password\r\ndebug3: start over, passed a different list publickey,password\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 public key: RSA SHA256:J4C4Gfnr4KFPh+FBFNJ4Q5AW+9VdCkGcLT7inPhUIj8 /home/redacted_username/.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 60\r\ndebug1: Server accepts key: pkalg ssh-rsa blen 279\r\ndebug2: input_userauth_pk_ok: fp SHA256:J4C4Gfnr4KFPh+FBFNJ4Q5AW+9VdCkGcLT7inPhUIj8\r\ndebug3: sign_and_send_pubkey: RSA SHA256:J4C4Gfnr4KFPh+FBFNJ4Q5AW+9VdCkGcLT7inPhUIj8\r\ndebug3: send packet: type 50\r\ndebug3: receive packet: type 52\r\ndebug1: Enabling compression at level 6.\r\ndebug1: Authentication succeeded (publickey).\r\nAuthenticated to er-03.redacted.domain.com ([172.24.0.254]:2022).\r\ndebug1: setting up multiplex master socket\r\ndebug3: muxserver_listen: temporary control path /home/redacted_username/.ansible/cp/f38dda978f.xot2tVMH93ONxox2\r\ndebug2: fd 6 setting O_NONBLOCK\r\ndebug3: fd 6 is O_NONBLOCK\r\ndebug3: fd 6 is O_NONBLOCK\r\ndebug1: channel 0: new [/home/redacted_username/.ansible/cp/f38dda978f]\r\ndebug3: muxserver_listen: mux listener channel 0 fd 6\r\ndebug2: fd 4 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 11790\r\ndebug2: fd 6 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 7 setting O_NONBLOCK\r\ndebug3: fd 7 is O_NONBLOCK\r\ndebug1: channel 1: new [mux-control]\r\ndebug3: channel_post_mux_listener: new mux channel 1 fd 7\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 = 11792\r\ndebug3: mux_client_request_session: session request sent\r\ndebug3: mux_master_read_cb: channel 1 packet type 0x10000002 len 89\r\ndebug2: process_mux_new_session: channel 1: request tty 0, X 0, agent 0, subsys 0, term \"xterm-256color\", cmd \"/bin/sh -c '/usr/bin/python && sleep 0'\", env 0\r\ndebug3: process_mux_new_session: got fds stdin 8, stdout 9, stderr 10\r\ndebug2: fd 8 setting O_NONBLOCK\r\ndebug2: fd 9 setting O_NONBLOCK\r\ndebug2: fd 10 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 91\r\ndebug2: channel_input_open_confirmation: channel 2: callback start\r\ndebug2: client_session2_setup: id 2\r\ndebug1: Sending command: /bin/sh -c '/usr/bin/python && sleep 0'\r\ndebug2: channel 2: request exec confirm 1\r\ndebug3: send packet: type 98\r\ndebug3: mux_session_confirm: sending success reply\r\ndebug2: channel_input_open_confirmation: channel 2: callback done\r\ndebug2: channel 2: open confirm rwindow 0 rmax 32768\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug2: channel 2: rcvd adjust 2097152\r\ndebug3: receive packet: type 99\r\ndebug2: channel_input_status_confirm: type 99 id 2\r\ndebug2: exec request accepted on channel 2\r\ndebug2: channel 2: read<=0 rfd 8 len 0\r\ndebug2: channel 2: read failed\r\ndebug2: channel 2: close_read\r\ndebug2: channel 2: input open -> drain\r\ndebug2: channel 2: ibuf empty\r\ndebug2: channel 2: send eof\r\ndebug3: send packet: type 96\r\ndebug2: channel 2: input drain -> closed\r\ndebug2: channel 2: rcvd ext data 1015\r\nTraceback (most recent call last):\n  File \"/tmp/ansible_0EIPLh/ansible_module_edgeos_facts.py\", line 311, in <module>\n    main()\n  File \"/tmp/ansible_0EIPLh/ansible_module_edgeos_facts.py\", line 299, in main\n    inst.populate()\n  File \"/tmp/ansible_0EIPLh/ansible_module_edgeos_facts.py\", line 187, in populate\n    super(Neighbors, self).populate()\n  File \"/tmp/ansible_0EIPLh/ansible_module_edgeos_facts.py\", line 110, in populate\n    self.responses = run_commands(self.module, list(self.COMMANDS))\n  File \"/tmp/ansible_0EIPLh/ansible_modlib.zip/ansible/module_utils/network/edgeos/edgeos.py\", line 74, in run_commands\n  File \"/tmp/ansible_0EIPLh/ansible_modlib.zip/ansible/module_utils/network/edgeos/edgeos.py\", line 40, in get_connection\n  File \"/tmp/ansible_0EIPLh/ansible_modlib.zip/ansible/module_utils/network/edgeos/edgeos.py\", line 54, in get_capabilities\n  File \"/tmp/ansible_0EIPLh/ansible_modlib.zip/ansible/module_utils/connection.py\", line 98, in __init__\nAssertionError: socket_path must be a value\ndebug2: channel 2: written 1015 to efd 10\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 1\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 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 nr0 i3/0 o1/16 fd 7/7 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_client_read_packet: read header failed: Broken pipe\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: Received exit status from master 1\r\ndebug2: channel 1: garbage collecting\r\ndebug1: channel 1: free: mux-control, nchannels 2\r\ndebug3: channel 1: status: The following connections are open:\r\n  #1 mux-control (t16 nr0 i3/0 o3/0 fd 7/7 cc -1)\r\n\r\ndebug2: set_control_persist_exit_time: schedule exit in 60 seconds\r\n", 
    "module_stdout": "", 
    "msg": "MODULE FAILURE", 
    "rc": 1
}
ansibot commented 6 years ago

Files identified in the description:

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

click here for bot help

ansibot commented 6 years ago

cc @qalthos @samdoran click here for bot help

Qalthos commented 6 years ago

The EdgeOS modules are network modules and as such work slightly differently from other modules in Ansible (see http://docs.ansible.com/ansible/2.5/network/getting_started/network_differences.html).

The short version is that you need to specify connection: network_cli on EdgeOS hosts, either with -c network_cli or as vars in your inventory.

@samdoran this should probably be clearer in terms of documentation and error messages, similar to how some of the other modules have been updated recently.

samdoran commented 6 years ago

@mwegrzynek I am able to connect to EdgeOS 1.10.1 successfully. Can you try setting connection to network_cli and see if that resolves your issue?

- name: EdgeOS Testing
  hosts: edgeos:&lab
  gather_facts: no
  become: no
  connection: network_cli

  tasks:
    - name: Gather facts
      edgeos_facts:
        gather_subset:
          - config
          - default

    - debug:
        var: ansible_net_version

    - edgeos_command:
        commands:
          - show date
          - show interfaces
          - show hardware cpu
          - show hardware mem
      register: output

    - debug:
        var: output.stdout_lines

    - edgeos_config:
        backup: yes
        save: yes
        lines:
          - set system config-management commit-revisions 50
      tags: config
> ansible-playbook edgeos.yml

PLAY [EdgeOS Testing] ****************************************************************************************************

TASK [Gather facts] ******************************************************************************************************
ok: [er-01]

TASK [debug] *************************************************************************************************************
ok: [er-01] => {
    "ansible_net_version": "1.10.1"
}

TASK [edgeos_command] ****************************************************************************************************
ok: [er-01]

TASK [debug] *************************************************************************************************************
ok: [er-01] => {
    "output.stdout_lines": [
        [
            "Mon Apr 30 18:01:31 EDT 2018"
        ],
        [
            "Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down",
            "Interface    IP Address                        S/L  Description                 ",
            "---------    ----------                        ---  -----------                 ",
            "br0          192.168.0.0/28                    u/u  Admin                       ",
            "br0.110      192.168.0.0/27                    u/u  IOT                         ",
            "br0.120      192.168.0.0/27                  u/u  Guest                       ",
            "br0.130      192.168.0.0/26                    u/u  Inside                      ",
            "eth0         5.5.5.5/23                        u/u  Internet                    ",
            "eth1         -                                 u/u  AP                          ",
            "eth2         -                                 u/u  AP                           ",
            "eth3         -                                 u/u  AP                           ",
            "eth4         -                                 u/u  Uplink to switch             ",
            "lo           127.0.0.1/8                       u/u                              ",
            "             ::1/128                          ",
            "switch0      -                                 u/u  Admin                       ",
            "vtun0        192.168.0.029/28                    u/u VPN               ",
            "vtun1        10.99.99.1                        u/u  VPN                  ",
            "vtun2        10.99.99.3                        u/u  VPN"
        ],
        [
            "Architecture:          mips64",
            "Byte Order:            Big Endian",
            "CPU(s):                2",
            "On-line CPU(s) list:   0,1",
            "Thread(s) per core:    1",
            "Core(s) per socket:    1",
            "Socket(s):             2",
            "L1d cache:             16K",
            "L1i cache:             32K",
            "L2 cache:              128K"
        ],
        [
            "\u001b=",
            "MemTotal:         495520 kB\u001b[m",
            "MemFree:          247940 kB\u001b[m",
            "Buffers:           31252 kB\u001b[m",
            "Cached:           117208 kB\u001b[m",
            "SwapCached:            0 kB\u001b[m",
            "Active:            71976 kB\u001b[m",
            "Inactive:         113412 kB\u001b[m",
            "Active(anon):      39104 kB\u001b[m",
            "Inactive(anon):      120 kB\u001b[m",
            "Active(file):      32872 kB\u001b[m",
            "Inactive(file):   113292 kB\u001b[m",
            "Unevictable:           0 kB\u001b[m",
            "Mlocked:               0 kB\u001b[m",
            "SwapTotal:             0 kB\u001b[m",
            "SwapFree:              0 kB\u001b[m",
            "Dirty:                 8 kB\u001b[m",
            "Writeback:             0 kB\u001b[m",
            "AnonPages:         37024 kB\u001b[m",
            "Mapped:            20044 kB\u001b[m",
            "Shmem:              2296 kB\u001b[m",
            "Slab:              32600 kB\u001b[m",
            "SReclaimable:      13844 kB\u001b[m",
            "SUnreclaim:        18756 kB\u001b[m",
            "KernelStack:        1712 kB\u001b[m",
            "PageTables:         1216 kB\u001b[m",
            "NFS_Unstable:          0 kB\u001b[m",
            "Bounce:                0 kB\u001b[m",
            "WritebackTmp:          0 kB\u001b[m",
            "CommitLimit:      247760 kB\u001b[m",
            "Committed_AS:     272812 kB\u001b[m",
            "VmallocTotal:   534773760 kB\u001b[m",
            "VmallocUsed:       25748 kB\u001b[m",
            "VmallocChunk:   534685052 kB\u001b[m",
            "HugePages_Total:       0\u001b[m",
            "HugePages_Free:        0\u001b[m",
            "HugePages_Rsvd:        0\u001b[m",
            "HugePages_Surp:        0\u001b[m",
            "Hugepagesize:       2048 kB\u001b[m"
        ]
    ]
}

TASK [edgeos_config] *****************************************************************************************************
ok: [er-01]

PLAY RECAP ***************************************************************************************************************
er-01   : ok=5    changed=0    unreachable=0    failed=0
samdoran commented 6 years ago

needs_info

samdoran commented 6 years ago

@Qalthos What would be the best place for better error reporting? In the terminal plugin?

mwegrzynek commented 6 years ago

@samdoran Thanks, it seems setting network_cli fixes the problems. I had also pass ansible_network_os=edgeos (I'm running SSH on non-standard port on the EdgeRouters). Without ansible_network_os I was getting:

er-03.redacted.domain.com | FAILED! => {
    "msg": "Unable to automatically determine host network os. Please manually configure ansible_network_os value for this host"
}

Thanks once again!

samdoran commented 6 years ago

@mwegrzynek Yup, those are two key pieces to using Ansible Networking: setting ansible_network_os and setting ansible_connection: network_cli. I'll see about adding some warnings/info to the modules to better convey this.

Qalthos commented 6 years ago

What would be the best place for better error reporting?

The other modules do it in the action plugin. edgeos doesn't have an action plugin, but something along the lines of

class ActionModule(_ActionModule):
    def run(self, task_vars=None):
        if self._play_context.connection != 'network_cli':
              return {'failed': True, 'msg': 'Connection type %s is not valid for this module' % self._play_context.connection}
        return super(ActionModule, self).run(task_vars=task_vars)

might be reasonable. Other than that, something in the notes: section of the modules to indicate supported connection type might help.

samdoran commented 6 years ago

@Qalthos That's enough to get me started. Thanks!