Repository: ansible/ansible

Issue:
aruba_command and aruba_config authenticates the connection but fails running the task
<!---
Verify first that your issue/request is not already reported on GitHub.
Also test if the latest release and master branch are affected too.
-->

##### ISSUE TYPE
<!--- Pick one below and delete the rest: -->
 - Bug Report
##### COMPONENT NAME
<!--- Name of the module/plugin/task/feature -->

aruba_command
aruba_config

##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes below -->
the ansible bundled with tower bundled setup 3.2.1-1.el7, however, running ansible from CLI
```
ansible 2.4.1.0
  config file = /tmp/NetDevOps/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /bin/ansible
  python version = 2.7.5 (default, May  3 2017, 07:55:04) [GCC 4.8.5 20150623 (Red Hat 4.8.5-14)]
 
```

##### CONFIGURATION
<!---
If using Ansible 2.4 or above, paste the results of "ansible-config dump --only-changed"

Otherwise, mention any settings you have changed/added/removed in ansible.cfg
(or using the ANSIBLE_* environment variables).

-->

DEFAULT_DEBUG(env: ANSIBLE_DEBUG) = True
DEFAULT_LOG_PATH(env: ANSIBLE_LOG_PATH) = /root/ansible.log
DEFAULT_ROLES_PATH(/tmp/NetDevOps/ansible.cfg) = [u'/etc/ansible/roles', u'/usr/share/ansible/roles']
DEFAULT_TIMEOUT(/tmp/NetDevOps/ansible.cfg) = 60
HOST_KEY_CHECKING(/tmp/NetDevOps/ansible.cfg) = False
##### OS / ENVIRONMENT
<!---
Mention the OS you are running Ansible from, and the OS you are
managing, or say "N/A" for anything that is not platform-specific.
Also mention the specific version of what you are trying to control,
e.g. if this is a network bug the version of firmware on the network device.




-->
RHEL7.4, trying to manage HP/Aruba switches
HP 8212 with k15.16.0012m
 Aruba 5412Rzl2 KB.16.02.0013
##### SUMMARY
<!--- Explain the problem briefly -->
could not run Ansible on Aruba/HP devices. from the logs, it looks like it does successfully connect, however for some reasons the task fails, tried larger timeouts in the provider 300, did not help.
I always get the error below
ok: [aruba] => {
    "output": {
        "changed": false,
        "failed": true,
        "msg": "unable to open shell. Please see: https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell"
    }
}

using netmiko with driver 'hp procurve' just to `show version` similar to what I was trying with aruba_command works fine and not much delay noticed. 

##### STEPS TO REPRODUCE
<!---
For bugs, show exactly how to reproduce the problem, using a minimal test-case.
For new features, show how the feature would be used.
-->
run the playbook below after having the variables set correctly in the inventory 
`ansible-playbook -i inventory base_configuration//check_aruba.yaml -vvvv`
<!--- Paste example playbooks or commands between quotes below -->
```yaml
---
- name: Check Aruba connection
  hosts: aruba
  gather_facts: no
  connection: local
  vars:
     provider:
       username: "{{ansible_user }}"
       password: "{{ ansible_password }}"
       host:   "{{ ansible_host }}"
       timeout: 360
  tasks:
     #- debug:
     #    msg: "{{ provider.username }}  has {{ provider['password'] }} on {{ provider.host }}"
     #    verbosity: 4
     - aruba_config:
         backup: yes
         provider:  "{{ provider }}"
       ignore_errors: yes
 
     - name: run show version on remote devices
       aruba_command:
         commands: show version
         interval: 300
         provider: "{{ provider }}"
       register: output
       ignore_errors: yes
 
     - debug: var=output
```

<!--- You can also paste gist.github.com links for larger files -->

##### EXPECTED RESULTS
<!--- What did you expect to happen when running the steps above? -->
the aruba_command to run `show version` and report back the switch version
the aruba_config to backup the device
##### ACTUAL RESULTS
<!--- What actually happened? If possible run with extra verbosity (-vvvv) -->
```
ansible-playbook 2.4.1.0
  config file = /tmp/NetDevOps/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /bin/ansible-playbook
  python version = 2.7.5 (default, May  3 2017, 07:55:04) [GCC 4.8.5 20150623 (Red Hat 4.8.5-14)]
Using /tmp/NetDevOps/ansible.cfg as config file
setting up inventory plugins
Parsed /tmp/NetDevOps/inventory inventory source with ini plugin
Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc
 
PLAYBOOK: check_aruba.yaml ***********************************************************************************************************************************************************************************************************
1 plays in base_configuration//check_aruba.yaml
 
PLAY [Check Aruba connection] ********************************************************************************************************************************************************************************************************
META: ran handlers
 
TASK [aruba_config] ******************************************************************************************************************************************************************************************************************
task path: /tmp/NetDevOps/base_configuration/check_aruba.yaml:16
<192.168.100.10> using connection plugin network_cli
<192.168.100.10> socket_path: None
fatal: [aruba]: FAILED! => {
    "changed": false,
    "failed": true,
    "msg": "unable to open shell. Please see: https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell"
}
...ignoring
 
TASK [run show version on remote devices] ********************************************************************************************************************************************************************************************
task path: /tmp/NetDevOps/base_configuration/check_aruba.yaml:21
<192.168.100.10> using connection plugin network_cli
<192.168.100.10> socket_path: None
fatal: [aruba]: FAILED! => {
    "changed": false,
    "failed": true,
    "msg": "unable to open shell. Please see: https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell"
}
...ignoring
 
TASK [debug] *************************************************************************************************************************************************************************************************************************
task path: /tmp/NetDevOps/base_configuration/check_aruba.yaml:29
ok: [aruba] => {
    "output": {
        "changed": false,
        "failed": true,
        "msg": "unable to open shell. Please see: https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell"
    }
}
META: ran handlers
META: ran handlers
 
PLAY RECAP ***************************************************************************************************************************************************************************************************************************
aruba                      : ok=3    changed=0    unreachable=0    failed=0
```

from ansible.log while enabling debugging:
```
2017-11-29 16:15:23,558 paramiko.transport Authentication (password) successful!
2017-11-29 16:15:23,559 p=12793 u=root |  ssh connection done, setting terminal
2017-11-29 16:15:23,560 paramiko.transport [chan 0] Max packet in: 32768 bytes
2017-11-29 16:15:23,648 paramiko.transport [chan 0] Max packet out: 32768 bytes
2017-11-29 16:15:23,648 paramiko.transport Secsh channel 0 opened.
2017-11-29 16:15:23,748 paramiko.transport [chan 0] Sesch channel 0 request ok
2017-11-29 16:15:23,849 paramiko.transport [chan 0] Sesch channel 0 request ok
12799 1511961323.85404: Loading TerminalModule 'aruba' from /usr/lib/python2.7/site-packages/ansible/plugins/terminal/aruba.py
2017-11-29 16:15:23,854 p=12793 u=root |   12799 1511961323.85404: Loading TerminalModule 'aruba' from /usr/lib/python2.7/site-packages/ansible/plugins/terminal/aruba.py
2017-11-29 16:15:23,854 p=12793 u=root |  loaded terminal plugin for network_os aruba
12799 1511961323.85729: Loading Cliconf 'aruba' from /usr/lib/python2.7/site-packages/ansible/plugins/cliconf/aruba.py
2017-11-29 16:15:23,857 p=12793 u=root |   12799 1511961323.85729: Loading Cliconf 'aruba' from /usr/lib/python2.7/site-packages/ansible/plugins/cliconf/aruba.py
2017-11-29 16:15:23,857 p=12793 u=root |  loaded cliconf plugin for network_os aruba
2017-11-29 16:15:32,495 p=12781 u=root |   12792 1511961332.49476: handler run complete
2017-11-29 16:15:32,495 p=12781 u=root |   12792 1511961332.49566: attempt loop complete, returning result
2017-11-29 16:15:32,496 p=12781 u=root |   12792 1511961332.49599: _execute() done
2017-11-29 16:15:32,496 p=12781 u=root |   12792 1511961332.49619: dumping result to json
2017-11-29 16:15:32,496 p=12781 u=root |   12792 1511961332.49639: done dumping result, returning
2017-11-29 16:15:32,496 p=12781 u=root |   12792 1511961332.49676: done running TaskExecutor() for aruba/TASK: run show version on remote devices [00155d8a-9c1e-8b55-c5c9-00000000000c]
2017-11-29 16:15:32,497 p=12781 u=root |   12792 1511961332.49709: sending task result for task 00155d8a-9c1e-8b55-c5c9-00000000000c
2017-11-29 16:15:32,498 p=12781 u=root |   12792 1511961332.49792: done sending task result for task 00155d8a-9c1e-8b55-c5c9-00000000000c
2017-11-29 16:15:32,498 p=12781 u=root |   12792 1511961332.49858: WORKER PROCESS EXITING
2017-11-29 16:15:32,500 p=12781 u=root |  fatal: [aruba]: FAILED! => {"changed": false, "failed": true, "msg": "unable to open shell. Please see: https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-s
hell"}
2017-11-29 16:15:32,500 p=12781 u=root |  ...ignoring
 
 
 another one with timeout 300 ran today for aruba_config with one attribute backup=yes

2017-11-30 08:26:59,131 paramiko.transport Authentication (password) successful!
2017-11-30 08:26:59,144 p=38404 u=root |  ssh connection done, setting terminal
2017-11-30 08:26:59,144 paramiko.transport [chan 0] Max packet in: 32768 bytes
2017-11-30 08:26:59,221 paramiko.transport [chan 0] Max packet out: 32768 bytes
2017-11-30 08:26:59,221 paramiko.transport Secsh channel 0 opened.
2017-11-30 08:26:59,321 paramiko.transport [chan 0] Sesch channel 0 request ok
2017-11-30 08:26:59,422 paramiko.transport [chan 0] Sesch channel 0 request ok
38410 1512019619.42698: Loading TerminalModule 'aruba' from /usr/lib/python2.7/site-packages/ansible/plugins/terminal/aruba.py
2017-11-30 08:26:59,427 p=38404 u=root |   38410 1512019619.42698: Loading TerminalModule 'aruba' from /usr/lib/python2.7/site-packages/ansible/plugins/terminal/aruba.py
2017-11-30 08:26:59,427 p=38404 u=root |  loaded terminal plugin for network_os aruba
38410 1512019619.42976: Loading Cliconf 'aruba' from /usr/lib/python2.7/site-packages/ansible/plugins/cliconf/aruba.py
2017-11-30 08:26:59,429 p=38404 u=root |   38410 1512019619.42976: Loading Cliconf 'aruba' from /usr/lib/python2.7/site-packages/ansible/plugins/cliconf/aruba.py
2017-11-30 08:26:59,429 p=38404 u=root |  loaded cliconf plugin for network_os aruba
2017-11-30 08:32:00,250 paramiko.transport [chan 0] EOF received (0)
2017-11-30 08:32:00,251 paramiko.transport [chan 0] EOF sent (0)
2017-11-30 08:32:00,252 paramiko.transport EOF in transport thread
2017-11-30 08:32:58,953 p=38392 u=root |   38403 1512019978.95353: handler run complete
2017-11-30 08:32:58,954 p=38392 u=root |   38403 1512019978.95416: attempt loop complete, returning result
2017-11-30 08:32:58,954 p=38392 u=root |   38403 1512019978.95440: _execute() done
2017-11-30 08:32:58,954 p=38392 u=root |   38403 1512019978.95462: dumping result to json
2017-11-30 08:32:58,954 p=38392 u=root |   38403 1512019978.95487: done dumping result, returning
2017-11-30 08:32:58,955 p=38392 u=root |   38403 1512019978.95516: done running TaskExecutor() for aruba/TASK: aruba_config [00155d8a-9c1e-352e-8219-00000000000c]
2017-11-30 08:32:58,955 p=38392 u=root |   38403 1512019978.95553: sending task result for task 00155d8a-9c1e-352e-8219-00000000000c
2017-11-30 08:32:58,966 p=38392 u=root |   38403 1512019978.96684: done sending task result for task 00155d8a-9c1e-352e-8219-00000000000c
2017-11-30 08:32:58,967 p=38392 u=root |   38403 1512019978.96718: WORKER PROCESS EXITING
2017-11-30 08:32:58,995 p=38392 u=root |  fatal: [aruba]: FAILED! => {"changed": false, "failed": true, "msg": "unable to open shell. Please see: https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-s
hell"}
2017-11-30 08:32:58,995 p=38392 u=root |  ...ignoring
2017-11-30 08:32:58,996 p=38392 u=root |   38392 1512019978.99599: no more pending results, returning what we have
2017-11-30 08:32:58,996 p=38392 u=root |   38392 1512019978.99620: results queue empty
2017-11-30 08:32:58,996 p=38392 u=root |   38392 1512019978.99637: checking for any_errors_fatal
2017-11-30 08:32:58,996 p=38392 u=root |   38392 1512019978.99658: done checking for any_errors_fatal
2017-11-30 08:32:58,996 p=38392 u=root |   38392 1512019978.99678: checking for max_fail_percentage
2017-11-30 08:32:58,997 p=38392 u=root |   38392 1512019978.99696: done checking for max_fail_percentage
2017-11-30 08:32:58,997 p=38392 u=root |   38392 1512019978.99712: checking to see if all hosts have failed and the running result is not ok
2017-11-30 08:32:58,997 p=38392 u=root |   38392 1512019978.99729: done checking to see if all hosts have failed
2017-11-30 08:32:58,997 p=38392 u=root |   38392 1512019978.99745: getting the remaining hosts for this loop
2017-11-30 08:32:58,997 p=38392 u=root |   38392 1512019978.99766: done getting the remaining hosts for this loop
2017-11-30 08:32:58,997 p=38392 u=root |   38392 1512019978.99790: building list of next tasks for hosts
2017-11-30 08:32:58,998 p=38392 u=root |   38392 1512019978.99807: getting the next task for host aruba
2017-11-30 08:32:58,998 p=38392 u=root |   38392 1512019978.99826: done getting next task for host aruba
2017-11-30 08:32:58,998 p=38392 u=root |   38392 1512019978.99846:  ^ task is: TASK: run show version on remote devices
2017-11-30 08:32:58,998 p=38392 u=root |   38392 1512019978.99864:  ^ state is: HOST STATE: block=2, task=3, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), re
scue child state? (None), always child state? (None), did rescue? False, did start at task? False
2017-11-30 08:32:58,998 p=38392 u=root |   38392 1512019978.99885: done building task lists
2017-11-30 08:32:58,999 p=38392 u=root |   38392 1512019978.99902: counting tasks in each state of execution
2017-11-30 08:32:58,999 p=38392 u=root |   38392 1512019978.99919: done counting tasks in each state of execution:
        num_setups: 0
        num_tasks: 1
        num_rescue: 0
        num_always: 0
2017-11-30 08:32:58,999 p=38392 u=root |   38392 1512019978.99938: advancing hosts in ITERATING_TASKS
2017-11-30 08:32:58,999 p=38392 u=root |   38392 1512019978.99954: starting to advance hosts
2017-11-30 08:32:58,999 p=38392 u=root |   38392 1512019978.99973: getting the next task for host aruba
2017-11-30 08:32:59,000 p=38392 u=root |   38392 1512019978.99993: done getting next task for host aruba
2017-11-30 08:32:59,000 p=38392 u=root |   38392 1512019979.00012:  ^ task is: TASK: run show version on remote devices
2017-11-30 08:32:59,000 p=38392 u=root |   38392 1512019979.00030:  ^ state is: HOST STATE: block=2, task=3, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), re
scue child state? (None), always child state? (None), did rescue? False, did start at task? False
ansible-playbook 2.4.1.0
  config file = /tmp/NetDevOps/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /bin/ansible-playbook
  python version = 2.7.5 (default, May  3 2017, 07:55:04) [GCC 4.8.5 20150623 (Red Hat 4.8.5-14)]
Using /tmp/NetDevOps/ansible.cfg as config file
setting up inventory plugins
Parsed /tmp/NetDevOps/inventory inventory source with ini plugin
Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc
 
PLAYBOOK: check_aruba.yaml ***********************************************************************************************************************************************************************************************************
1 plays in base_configuration//check_aruba.yaml
 
PLAY [Check Aruba connection] ********************************************************************************************************************************************************************************************************
META: ran handlers
 
TASK [aruba_config] ******************************************************************************************************************************************************************************************************************
task path: /tmp/NetDevOps/base_configuration/check_aruba.yaml:16
<192.168.100.10> using connection plugin network_cli
<192.168.100.10> socket_path: None
fatal: [aruba]: FAILED! => {
    "changed": false,
    "failed": true,
    "msg": "unable to open shell. Please see: https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell"
}
...ignoring
 
TASK [run show version on remote devices] ********************************************************************************************************************************************************************************************
task path: /tmp/NetDevOps/base_configuration/check_aruba.yaml:21
<192.168.100.10> using connection plugin network_cli
<192.168.100.10> socket_path: None
fatal: [aruba]: FAILED! => {
    "changed": false,
    "failed": true,
    "msg": "unable to open shell. Please see: https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell"
}
...ignoring
 
TASK [debug] *************************************************************************************************************************************************************************************************************************
task path: /tmp/NetDevOps/base_configuration/check_aruba.yaml:29
ok: [aruba] => {
    "output": {
        "changed": false,
        "failed": true,
        "msg": "unable to open shell. Please see: https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell"
    }
}
META: ran handlers
META: ran handlers
 
PLAY RECAP ***************************************************************************************************************************************************************************************************************************
aruba                      : ok=3    changed=0    unreachable=0    failed=0
```
<!--- Paste verbatim command output between quotes below -->
```

```



Discussion:
Files identified in the description:
* [lib/ansible/modules/network/a10](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/a10)
* [lib/ansible/modules/network/aci](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/aci)
* [lib/ansible/modules/network/aireos](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/aireos)
* [lib/ansible/modules/network/aos](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/aos)
* [lib/ansible/modules/network/aruba/aruba_config.py](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/aruba/aruba_config.py)
* [lib/ansible/modules/network/asa](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/asa)
* [lib/ansible/modules/network/avi](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/avi)
* [lib/ansible/modules/network/bigswitch](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/bigswitch)
* [lib/ansible/modules/network/citrix](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/citrix)
* [lib/ansible/modules/network/cloudengine](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/cloudengine)
* [lib/ansible/modules/network/cloudvision](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/cloudvision)
* [lib/ansible/modules/network/cnos](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/cnos)
* [lib/ansible/modules/network/cumulus](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/cumulus)
* [lib/ansible/modules/network/dellos10](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/dellos10)
* [lib/ansible/modules/network/dellos6](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/dellos6)
* [lib/ansible/modules/network/dellos9](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/dellos9)
* [lib/ansible/modules/network/enos](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/enos)
* [lib/ansible/modules/network/eos](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/eos)
* [lib/ansible/modules/network/f5](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/f5)
* [lib/ansible/modules/network/fortios](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/fortios)
* [lib/ansible/modules/network/illumos](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/illumos)
* [lib/ansible/modules/network/interface](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/interface)
* [lib/ansible/modules/network/iosxr](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/iosxr)
* [lib/ansible/modules/network/ironware](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/ironware)
* [lib/ansible/modules/network/junos](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/junos)
* [lib/ansible/modules/network/layer2](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/layer2)
* [lib/ansible/modules/network/layer3](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/layer3)
* [lib/ansible/modules/network/mlnxos](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/mlnxos)
* [lib/ansible/modules/network/netconf](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/netconf)
* [lib/ansible/modules/network/netscaler](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/netscaler)
* [lib/ansible/modules/network/netvisor](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/netvisor)
* [lib/ansible/modules/network/nso](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/nso)
* [lib/ansible/modules/network/nuage](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/nuage)
* [lib/ansible/modules/network/nxos](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/nxos)
* [lib/ansible/modules/network/ordnance](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/ordnance)
* [lib/ansible/modules/network/ovs](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/ovs)
* [lib/ansible/modules/network/panos](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/panos)
* [lib/ansible/modules/network/protocol](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/protocol)
* [lib/ansible/modules/network/radware](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/radware)
* [lib/ansible/modules/network/routing](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/routing)
* [lib/ansible/modules/network/sros](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/sros)
* [lib/ansible/modules/network/system](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/system)
* [lib/ansible/modules/network/vyos](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/vyos)

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](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: components_banner --->
cc @Qalthos @QijunPan @abirami-n @alexanderturner @amitsi @bjolivot @caphrim007 @chiradeep @cmoberg @dagwieers @dgarros @dhivyap @djh00t @ericchou1 @ericsysmin @ganeshrn @giorgos-nikolopoulos @grastogi23 @gundalow @isharacomix @ivanbojer @jayakody @jeremyschulman @jmcgill298 @jmighion @jrrivers @jtschichold @kedarX @khaltore @mikewiebe @mischapeters @ogenstad @paulquack @pdellaert @pekdon @privateip @rahushen @rcarrillocruz @schunduri @skg-net @tedelhourani @trishnaguha @vuile @xen0l
[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: notify --->
Files identified in the description:
* [lib/ansible/modules/network/aruba/aruba_command.py](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/aruba/aruba_command.py)
* [lib/ansible/modules/network/aruba/aruba_config.py](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/aruba/aruba_config.py)

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](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: components_banner --->
!component -lib/ansible/modules/network/aci
bot_broken
Not broken, the original component said "network modules aruba_command and aruba_config"
I'll update the ISSUE_TEMPLATE to say Only list the module name

https://github.com/ansible/ansible/commit/390a17f0eb8b88cacb223e1d1b71dcc57eec9753#diff-1a1c3dd142f76a5fad803a0c52839881
Looks like the socket path isn't getting made / used. You should see something similar to 
```
using connection plugin network_cli
socket_path: /home/jmighion/.ansible/pc/692f43dd56
```

But instead your output show 
```
<192.168.100.10> using connection plugin network_cli
<192.168.100.10> socket_path: None
```

I did not have a lot of versions to dev against, so it could be getting hung looking for the prompt since it's auth'd and then waits until the timeout happens. Can you please provide what the prompt looks like when you log into the device?

needs_info
the prompt for the user that is managing these Aruba devices  ends with a hash '#' , something like
device-name # 

Thanks. I'll be unavailable to work on this for a week. I'll get back to it asap.
no problem, let me know if I can help, not sure how much I can, but if there is a  code that I should look into,  try different things with the module. let me know, I am new to the network, and network automation domain.
Not sure if this Aruba modules support switches or only Wireless.

you are right @victorock Aruba could mean different things "clearpass", HP procurve, airwave,..etc. in netmiko aruba is pro-curve switches.
I believe the prompt is still the issue. Looking at the regexes for the prompts in aruba's terminal plugin : https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/terminal/aruba.py#L32

The first one will only work if there are parens with something inbetween, the 2nd is to handle some password prompts for specific commands, and the 3rd would only detect `devicename #` if the positive lookahead for whitespace passes.

When you log into your host, is there any banners or newlines or just `devicename #`?
Could you possibly show me the terminal output, stripped of anything important, for logging in?
when I login there is a multiline banner, and then devicename # prompt. will post an output tomorrow from work 
 From the output below, it seems the aruba_*  modules understand the banner, and authenticates just fine, the issue is after authentication. I can see socket path is created and used in the first lines of logs. I tried also setting no banner, and having a banner, but apparently, this was not the issue.

so to answer your question:
* there is a multiline banner. However my small exercise proved that banner is not an issue, I tried with adding a newline after the multiline message and with no banner message.
* so first, there is login prompt, then banner message, then password, when authenticated correctly, a message will appear regarding status of the last login then command prompt as in `SwitchName# `
 as in `Your previous successful login (as manager) was on 2017-12-24 15:54:51     
 from 192.168.13.7` line below

```
******************************************
2017-12-20 07:20:19,458 p=16508 u=root |  creating new control socket for host 10.2.113.240:22 as user net_ansible
2017-12-20 07:20:19,459 p=16508 u=root |  control socket path is /root/.ansible/pc/0a8754b750
2017-12-20 07:20:19,459 p=16508 u=root |  current working directory is /root/NetDevOps
2017-12-20 07:20:19,459 p=16508 u=root |  using connection plugin network_cli
2017-12-20 07:20:19,569 paramiko.transport starting thread (client mode): 0x1b835d0L
2017-12-20 07:20:19,569 paramiko.transport Local version/idstring: SSH-2.0-paramiko_1.16.1
2017-12-20 07:20:19,895 paramiko.transport Remote version/idstring: SSH-2.0-Mocana SSH 5.8
2017-12-20 07:20:19,895 paramiko.transport [chan 0] EOF received (0)
2017-12-20 07:20:19,895 paramiko.transport Connected (version 2.0, client Mocana)
2017-12-20 07:20:19,895 paramiko.transport [chan 0] EOF sent (0)
2017-12-20 07:20:19,896 paramiko.transport EOF in transport thread
2017-12-20 07:20:20,276 paramiko.transport kex algos:[u'diffie-hellman-group14-sha1'] server key:[u'ssh-rsa'] client encrypt:[u'aes256-ctr', u'aes256-cbc', u'rijndael-cbc@lysator.liu.se', u'aes192-ctr', u'aes192-cbc', u'aes128-ctr', u'aes128-cbc', u'3des-cbc'] server encrypt:[u'aes256-ctr', u'aes256-cbc', u'rijndael-cbc@lysator.liu.se', u'aes192-ctr', u'aes192-cbc', u'aes128-ctr', u'aes128-cbc', u'3des-cbc'] client mac:[u'hmac-sha1-96', u'hmac-md5', u'hmac-sha1', u'hmac-md5-96'] server mac:[u'hmac-sha1-96', u'hmac-md5', u'hmac-sha1', u'hmac-md5-96'] client compress:[u'none'] server compress:[u'none'] client lang:[u''] server lang:[u''] kex follows?False
2017-12-20 07:20:20,277 paramiko.transport Kex agreed: diffie-hellman-group14-sha1
2017-12-20 07:20:20,277 paramiko.transport Cipher agreed: aes128-ctr
2017-12-20 07:20:20,277 paramiko.transport MAC agreed: hmac-md5
2017-12-20 07:20:20,277 paramiko.transport Compression agreed: none
2017-12-20 07:20:20,740 paramiko.transport kex engine KexGroup14 specified hash_algo <built-in function openssl_sha1>
2017-12-20 07:20:20,742 paramiko.transport Switch to new keys ...
2017-12-20 07:20:20,783 paramiko.transport userauth is OK
2017-12-20 07:20:20,785 paramiko.transport Auth banner:

2017-12-20 07:20:21,003 paramiko.transport Authentication (password) successful!
2017-12-20 07:20:21,005 p=16508 u=root |  ssh connection done, setting terminal
2017-12-20 07:20:21,006 paramiko.transport [chan 0] Max packet in: 32768 bytes
2017-12-20 07:20:21,092 paramiko.transport [chan 0] Max packet out: 32768 bytes
2017-12-20 07:20:21,093 paramiko.transport Secsh channel 0 opened.
2017-12-20 07:20:21,196 paramiko.transport [chan 0] Sesch channel 0 request ok
2017-12-20 07:20:21,300 paramiko.transport [chan 0] Sesch channel 0 request ok
2017-12-20 07:20:21,305 p=16508 u=root |  loaded terminal plugin for network_os aruba
2017-12-20 07:20:21,307 p=16508 u=root |  loaded cliconf plugin for network_os aruba
2017-12-20 07:25:19,879 p=15740 u=root |  fatal: [aruba5412Rzl2]: FAILED! => {"changed": false, "failed": true, "msg": "unable to open shell. Please see: https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell"}
2017-12-20 07:25:19,880 p=15740 u=root |  ...ignoring
````
*putty log to show sample banner, and prompt:*

```
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2017.12.24 15:57:46 =~=~=~=~=~=~=~=~=~=~=~=
login as: ansible_netuser
========================================================
=                                                                                                                                                =
= This is a ACME Inc. device, which may be accessed and used only by       =
= ACME Inc. authorized personnel. Unauthorized access is forbdien etc    =
=                                                                                                                                                =
========================================================

Using keyboard-interactive authentication.
ansible_netuser@192.168.13.24's password: 
Your previous successful login (as manager) was on 2017-12-24 15:54:51     
 from 192.168.13.7
ARUBASW01# exit ARUBASW01> exitDo you want to log out (y/n)? y

```

when logged in to new Aruba device that is not yet  configured for the first time or configured, however, no banner message is set, one  gets the following:
```
HP J9851A Switch 5412Rzl2
Software revision KB.16.02.0022m

 (C) Copyright 2017 Hewlett Packard Enterprise Development LP

                      RESTRICTED RIGHTS LEGEND
 Confidential computer software. Valid license from Hewlett Packard Enterprise
 Development LP required for possession, use or copying. Consistent with FAR
 12.211 and 12.212, Commercial Computer Software, Computer Software
 Documentation, and Technical Data for Commercial Items are licensed to the
 U.S. Government under vendor's standard commercial license.

Press any key to continue

```
Hello.  @walidshaari did you find a solution to this issue?

I am also experiencing similar issues when using the aruba_command module.
Debugs indicate I authenticate and banner is displayed, but then it fails with "msg": "unable to open shell."  I can offer more outputs if necessary.
@thepackbot Can you please follow the steps detailed in http://docs.ansible.com/ansible/devel/network_debug_troubleshooting.html#how-to-troubleshoot
@gundalow OK I enabled the debug.

Below is the ansible.log output.

```
2018-01-03 15:30:09,275 p=2828 u=netadmin |  creating new control socket for host deathstar:22 as user aaron
2018-01-03 15:30:09,277 p=2828 u=netadmin |  control socket path is /home/netadmin/.ansible/pc/97910a0f22
2018-01-03 15:30:09,277 p=2828 u=netadmin |  current working directory is /home/netadmin
2018-01-03 15:30:09,277 p=2828 u=netadmin |  using connection plugin network_cli
  2832 1515011409.38552: Loading Connection 'network_cli' from /usr/lib/python2.7/dist-packages/ansible/plugins/connection/network_cli.py
2018-01-03 15:30:09,386 p=2828 u=netadmin |    2832 1515011409.38552: Loading Connection 'network_cli' from /usr/lib/python2.7/dist-packages/ansible/plugins/connection/network_cli.py
  2832 1515011409.38707: Loading ShellModule 'csh' from /usr/lib/python2.7/dist-packages/ansible/plugins/shell/csh.py
2018-01-03 15:30:09,387 p=2828 u=netadmin |    2832 1515011409.38707: Loading ShellModule 'csh' from /usr/lib/python2.7/dist-packages/ansible/plugins/shell/csh.py
  2832 1515011409.38743: Loading ShellModule 'fish' from /usr/lib/python2.7/dist-packages/ansible/plugins/shell/fish.py
2018-01-03 15:30:09,387 p=2828 u=netadmin |    2832 1515011409.38743: Loading ShellModule 'fish' from /usr/lib/python2.7/dist-packages/ansible/plugins/shell/fish.py
  2832 1515011409.38799: Loading ShellModule 'powershell' from /usr/lib/python2.7/dist-packages/ansible/plugins/shell/powershell.py
2018-01-03 15:30:09,388 p=2828 u=netadmin |    2832 1515011409.38799: Loading ShellModule 'powershell' from /usr/lib/python2.7/dist-packages/ansible/plugins/shell/powershell.py
  2832 1515011409.38818: Loading ShellModule 'sh' from /usr/lib/python2.7/dist-packages/ansible/plugins/shell/sh.py
2018-01-03 15:30:09,388 p=2828 u=netadmin |    2832 1515011409.38818: Loading ShellModule 'sh' from /usr/lib/python2.7/dist-packages/ansible/plugins/shell/sh.py
  2832 1515011409.38837: Loading ShellModule 'sh' from /usr/lib/python2.7/dist-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2018-01-03 15:30:09,388 p=2828 u=netadmin |    2832 1515011409.38837: Loading ShellModule 'sh' from /usr/lib/python2.7/dist-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
  2832 1515011409.39229: assigned :doc
2018-01-03 15:30:09,392 p=2828 u=netadmin |    2832 1515011409.39229: assigned :doc
  2832 1515011409.39264: Loaded config def from plugin (connection/network_cli)
2018-01-03 15:30:09,392 p=2828 u=netadmin |    2832 1515011409.39264: Loaded config def from plugin (connection/network_cli)
2018-01-03 15:30:09,395 paramiko.transport starting thread (client mode): 0x6b02b7d0L
2018-01-03 15:30:09,395 paramiko.transport Local version/idstring: SSH-2.0-paramiko_1.16.0
2018-01-03 15:30:09,395 paramiko.transport Remote version/idstring: SSH-2.0-Mocana SSH 5.8
2018-01-03 15:30:09,395 paramiko.transport Connected (version 2.0, client Mocana)
2018-01-03 15:30:09,435 paramiko.transport kex algos:[u'diffie-hellman-group14-sha1'] server key:[u'ssh-rsa'] client encrypt:[u'aes256-ctr', u'aes256-cbc', u'rijndael-cbc@lysator.liu.se', u'aes192-ctr', u'aes192-cbc', u'aes128-ctr', u'aes128-cbc'] server encrypt:[u'aes256-ctr', u'aes256-cbc', u'rijndael-cbc@lysator.liu.se', u'aes192-ctr', u'aes192-cbc', u'aes128-ctr', u'aes128-cbc'] client mac:[u'hmac-sha1-96', u'hmac-md5', u'hmac-sha1', u'hmac-md5-96'] server mac:[u'hmac-sha1-96', u'hmac-md5', u'hmac-sha1', u'hmac-md5-96'] client compress:[u'none'] server compress:[u'none'] client lang:[u''] server lang:[u''] kex follows?False
2018-01-03 15:30:09,435 paramiko.transport Kex agreed: diffie-hellman-group14-sha1
2018-01-03 15:30:09,435 paramiko.transport Cipher agreed: aes128-ctr
2018-01-03 15:30:09,436 paramiko.transport MAC agreed: hmac-md5
2018-01-03 15:30:09,436 paramiko.transport Compression agreed: none
2018-01-03 15:30:09,943 paramiko.transport kex engine KexGroup14 specified hash_algo <built-in function openssl_sha1>
/usr/lib/python2.7/dist-packages/Crypto/Cipher/blockalgo.py:141: FutureWarning: CTR mode needs counter parameter, not IV
  self._cipher = factory.new(key, *args, **kwargs)
2018-01-03 15:30:09,943 paramiko.transport Switch to new keys ...
2018-01-03 15:30:09,975 paramiko.transport userauth is OK
2018-01-03 15:30:09,977 paramiko.transport Auth banner: This is a private system
 Unauthorized access may result in civil and criminal penalties

2018-01-03 15:30:10,017 paramiko.transport Authentication (password) successful!
2018-01-03 15:30:10,037 p=2828 u=netadmin |  ssh connection done, setting terminal
2018-01-03 15:30:10,037 paramiko.transport [chan 0] Max packet in: 32768 bytes
2018-01-03 15:30:10,084 paramiko.transport [chan 0] Max packet out: 32768 bytes
2018-01-03 15:30:10,084 paramiko.transport Secsh channel 0 opened.
2018-01-03 15:30:10,184 paramiko.transport [chan 0] Sesch channel 0 request ok
2018-01-03 15:30:10,285 paramiko.transport [chan 0] Sesch channel 0 request ok
  2832 1515011410.28730: Loading TerminalModule 'aruba' from /usr/lib/python2.7/dist-packages/ansible/plugins/terminal/aruba.py
2018-01-03 15:30:10,287 p=2828 u=netadmin |    2832 1515011410.28730: Loading TerminalModule 'aruba' from /usr/lib/python2.7/dist-packages/ansible/plugins/terminal/aruba.py
2018-01-03 15:30:10,287 p=2828 u=netadmin |  loaded terminal plugin for network_os aruba
  2832 1515011410.28855: Loading Cliconf 'aruba' from /usr/lib/python2.7/dist-packages/ansible/plugins/cliconf/aruba.py
2018-01-03 15:30:10,288 p=2828 u=netadmin |    2832 1515011410.28855: Loading Cliconf 'aruba' from /usr/lib/python2.7/dist-packages/ansible/plugins/cliconf/aruba.py
2018-01-03 15:30:10,288 p=2828 u=netadmin |  loaded cliconf plugin for network_os aruba
2018-01-03 15:30:39,336 p=2774 u=netadmin |    2827 1515011439.33596: handler run complete
2018-01-03 15:30:39,337 p=2774 u=netadmin |    2827 1515011439.33703: attempt loop complete, returning result
2018-01-03 15:30:39,337 p=2774 u=netadmin |    2827 1515011439.33744: _execute() done
2018-01-03 15:30:39,338 p=2774 u=netadmin |    2827 1515011439.33794: dumping result to json
2018-01-03 15:30:39,338 p=2774 u=netadmin |    2827 1515011439.33837: done dumping result, returning
2018-01-03 15:30:39,339 p=2774 u=netadmin |    2827 1515011439.33919: done running TaskExecutor() for deathstar/TASK: Gather running configs [080027f9-f3c3-332b-f1be-00000000002c]
2018-01-03 15:30:39,340 p=2774 u=netadmin |    2827 1515011439.33971: sending task result for task 080027f9-f3c3-332b-f1be-00000000002c
2018-01-03 15:30:39,342 p=2774 u=netadmin |    2827 1515011439.34158: done sending task result for task 080027f9-f3c3-332b-f1be-00000000002c
2018-01-03 15:30:39,342 p=2774 u=netadmin |    2827 1515011439.34218: WORKER PROCESS EXITING
2018-01-03 15:30:39,343 p=2774 u=netadmin |    2774 1515011439.34348: marking deathstar as failed
2018-01-03 15:30:39,343 p=2774 u=netadmin |    2774 1515011439.34371: marking host deathstar failed, current state: HOST STATE: block=2, task=4, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
2018-01-03 15:30:39,343 p=2774 u=netadmin |    2774 1515011439.34384: ^ failed state is now: HOST STATE: block=2, task=4, rescue=0, always=0, run_state=ITERATING_COMPLETE, fail_state=FAILED_TASKS, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
2018-01-03 15:30:39,343 p=2774 u=netadmin |    2774 1515011439.34394: getting the next task for host deathstar
2018-01-03 15:30:39,344 p=2774 u=netadmin |    2774 1515011439.34403: host deathstar is done iterating, returning
2018-01-03 15:30:39,344 p=2774 u=netadmin |  fatal: [deathstar]: FAILED! => {
    "changed": false,
    "msg": "unable to open shell. Please see: https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell"
}
2018-01-03 15:30:39,345 p=2774 u=netadmin |    2774 1515011439.34483: no more pending results, returning what we have
2018-01-03 15:30:39,345 p=2774 u=netadmin |    2774 1515011439.34531: results queue empty
2018-01-03 15:30:39,346 p=2774 u=netadmin |    2774 1515011439.34630: checking for any_errors_fatal
2018-01-03 15:30:39,347 p=2774 u=netadmin |    2774 1515011439.34718: done checking for any_errors_fatal
2018-01-03 15:30:39,348 p=2774 u=netadmin |    2774 1515011439.34760: checking for max_fail_percentage
2018-01-03 15:30:39,349 p=2774 u=netadmin |    2774 1515011439.34875: done checking for max_fail_percentage
2018-01-03 15:30:39,349 p=2774 u=netadmin |    2774 1515011439.34920: checking to see if all hosts have failed and the running result is not ok
2018-01-03 15:30:39,349 p=2774 u=netadmin |    2774 1515011439.34965: done checking to see if all hosts have failed
2018-01-03 15:30:39,350 p=2774 u=netadmin |    2774 1515011439.35019: getting the remaining hosts for this loop
2018-01-03 15:30:39,351 p=2774 u=netadmin |    2774 1515011439.35071: done getting the remaining hosts for this loop
2018-01-03 15:30:39,351 p=2774 u=netadmin |    2774 1515011439.35120: building list of next tasks for hosts
2018-01-03 15:30:39,351 p=2774 u=netadmin |    2774 1515011439.35159: getting the next task for host deathstar
2018-01-03 15:30:39,352 p=2774 u=netadmin |    2774 1515011439.35213: host deathstar is done iterating, returning
2018-01-03 15:30:39,352 p=2774 u=netadmin |    2774 1515011439.35259: done building task lists
2018-01-03 15:30:39,353 p=2774 u=netadmin |    2774 1515011439.35295: counting tasks in each state of execution
2018-01-03 15:30:39,354 p=2774 u=netadmin |    2774 1515011439.35336: done counting tasks in each state of execution:
        num_setups: 0
        num_tasks: 0
        num_rescue: 0
        num_always: 0
2018-01-03 15:30:39,354 p=2774 u=netadmin |    2774 1515011439.35427: all hosts are done, so returning None's for all hosts
2018-01-03 15:30:39,354 p=2774 u=netadmin |    2774 1515011439.35463: done queuing things up, now waiting for results queue to drain
2018-01-03 15:30:39,355 p=2774 u=netadmin |    2774 1515011439.35509: results queue empty
2018-01-03 15:30:39,355 p=2774 u=netadmin |    2774 1515011439.35560: checking for any_errors_fatal
2018-01-03 15:30:39,356 p=2774 u=netadmin |    2774 1515011439.35609: done checking for any_errors_fatal
2018-01-03 15:30:39,356 p=2774 u=netadmin |    2774 1515011439.35655: checking for max_fail_percentage
2018-01-03 15:30:39,356 p=2774 u=netadmin |    2774 1515011439.35665: done checking for max_fail_percentage
2018-01-03 15:30:39,356 p=2774 u=netadmin |    2774 1515011439.35682: checking to see if all hosts have failed and the running result is not ok
2018-01-03 15:30:39,357 p=2774 u=netadmin |    2774 1515011439.35701: done checking to see if all hosts have failed
2018-01-03 15:30:39,357 p=2774 u=netadmin |    2774 1515011439.35715: getting the next task for host deathstar
2018-01-03 15:30:39,357 p=2774 u=netadmin |    2774 1515011439.35734: host deathstar is done iterating, returning
2018-01-03 15:30:39,357 p=2774 u=netadmin |    2774 1515011439.35746: running handlers
2018-01-03 15:30:39,358 p=2774 u=netadmin |     to retry, use: --limit @/home/netadmin/ansible/backup-switch-aruba.retry

2018-01-03 15:30:39,359 p=2774 u=netadmin |  PLAY RECAP **********************************************************************************************************************************************************************************************************************************
2018-01-03 15:30:39,359 p=2774 u=netadmin |  deathstar                  : ok=3    changed=0    unreachable=0    failed=1
2018-01-03 15:30:39,360 p=2774 u=netadmin |    2774 1515011439.36030: RUNNING CLEANUP
2018-01-03 15:30:40,768 p=2828 u=netadmin |  failed to create control socket for host deathstar
2018-01-03 15:30:40,769 p=2828 u=netadmin |  Traceback (most recent call last):
  File "/usr/bin/ansible-connection", line 315, in main
    server = Server(socket_path, pc)
  File "/usr/bin/ansible-connection", line 112, in __init__
    self.connection._connect()
  File "/usr/lib/python2.7/dist-packages/ansible/plugins/connection/network_cli.py", line 139, in _connect
    self.receive()
  File "/usr/lib/python2.7/dist-packages/ansible/plugins/connection/network_cli.py", line 176, in receive
    data = self._shell.recv(256)
  File "/usr/lib/python2.7/dist-packages/paramiko/channel.py", line 598, in recv
    raise socket.timeout()
timeout

2018-01-03 15:30:40,809 paramiko.transport EOF in transport thread
```


@thepackbot could you please test in the `devel` branch 
@thepackbot  what device you are trying to configure? os version, ..etc?  your debug output unlike mine goes a bit further after user is authenticated.
@gundalow I can test `devel `later today.  I'll post back.

@walidshaari Here's what I'm running.

My hardware:
```
Chassis: 8206zl J9477A
Software revision  : K.15.18.0013
```

Ansible version:
```
ansible 2.4.2.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/netadmin/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.12 (default, Nov 20 2017, 18:23:56) [GCC 5.4.0 20160609]
```

The playbook I'm trying to run:

```
---
- hosts: test-switch
  gather_facts: no
  connection: local

  vars:
    backup_dir: /tmp/backups/switches

  vars_prompt:
  - name: "user"
    prompt: "Username"
    private: no
  - name: "pass"
    prompt: "Password"

  tasks:

  - name: Define Provider
    set_fact:
      provider:
        host: "{{ inventory_hostname }}"
        username: "{{ user }}"
        password: "{{ pass }}"

  - name: Check backup folder exists
    file:
      path: "{{ backup_dir }}"
      state: directory
    run_once: yes

  - name: Check device folder exists
    file:
      path: "{{ backup_dir }}/{{ inventory_hostname }}"
      state: directory

  - name: Gather running configs
    aruba_command:
      commands: show running
      provider: "{{ provider }}"
      timeout: 30
    register: config

  - name: Get timestamp
    command: date +%Y%m%d%H%M
    register: timestamp

  - copy:
      content: "{{ config.stdout[0] }}"
      dest: "{{ backup_dir }}/{{ inventory_hostname }}/running-config_{{ inventory_hostname }}_{{ timestamp.stdout }}"

```
@gundalow I'm trying with `devel` now, but no success.  From what I gather it's still hanging up after SSH auth.  I hope the details I've provided below are useful.

```
ansible 2.5.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/netadmin/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/netadmin/.local/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.12 (default, Nov 20 2017, 18:23:56) [GCC 5.4.0 20160609]
```

Snippet from the `ansible-playbook -vvvv`

```
TASK [Gather running configs] ***************************************************************************************************************************************************************************************************************
task path: /home/netadmin/ansible/backup-switch-aruba.yml:36
  8723 1515103633.76755: sending task start callback
  8723 1515103633.76768: entering _queue_task() for deathstar/aruba_command
  8723 1515103633.76780: Creating lock for aruba_command
  8723 1515103633.76958: worker is 1 (out of 1 available)
  8723 1515103633.77043: exiting _queue_task() for deathstar/aruba_command
  8723 1515103633.77123: done queuing things up, now waiting for results queue to drain
  8723 1515103633.77168: waiting for pending results...
  8778 1515103633.77713: running TaskExecutor() for deathstar/TASK: Gather running configs
  8778 1515103633.77848: in run() - task 080027f9-f3c3-a76b-087e-00000000002c
  8778 1515103633.77928: calling self._execute()
  8778 1515103633.78162: Loading FilterModule 'core' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/core.py (found_in_cache=True, class_only=False)
  8778 1515103633.78212: Loading FilterModule 'ipaddr' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/ipaddr.py (found_in_cache=True, class_only=False)
  8778 1515103633.78277: Loading FilterModule 'json_query' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/json_query.py (found_in_cache=True, class_only=False)
  8778 1515103633.78331: Loading FilterModule 'mathstuff' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/mathstuff.py (found_in_cache=True, class_only=False)
  8778 1515103633.78407: Loading FilterModule 'network' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/network.py (found_in_cache=True, class_only=False)
  8778 1515103633.78458: Loading FilterModule 'urlsplit' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/urlsplit.py (found_in_cache=True, class_only=False)
  8778 1515103633.78588: Loading TestModule 'core' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/test/core.py (found_in_cache=True, class_only=False)
  8778 1515103633.78625: Loading TestModule 'files' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/test/files.py (found_in_cache=True, class_only=False)
  8778 1515103633.78670: Loading TestModule 'mathstuff' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/test/mathstuff.py (found_in_cache=True, class_only=False)
  8778 1515103633.78998: Loading FilterModule 'core' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/core.py (found_in_cache=True, class_only=False)
  8778 1515103633.79134: Loading FilterModule 'ipaddr' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/ipaddr.py (found_in_cache=True, class_only=False)
  8778 1515103633.79215: Loading FilterModule 'json_query' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/json_query.py (found_in_cache=True, class_only=False)
  8778 1515103633.79283: Loading FilterModule 'mathstuff' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/mathstuff.py (found_in_cache=True, class_only=False)
  8778 1515103633.79403: Loading FilterModule 'network' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/network.py (found_in_cache=True, class_only=False)
  8778 1515103633.79455: Loading FilterModule 'urlsplit' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/urlsplit.py (found_in_cache=True, class_only=False)
  8778 1515103633.79567: Loading TestModule 'core' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/test/core.py (found_in_cache=True, class_only=False)
  8778 1515103633.79635: Loading TestModule 'files' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/test/files.py (found_in_cache=True, class_only=False)
  8778 1515103633.79684: Loading TestModule 'mathstuff' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/test/mathstuff.py (found_in_cache=True, class_only=False)
  8778 1515103633.80064: Loading Connection 'local' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/connection/local.py
  8778 1515103633.80189: Loading ShellModule 'csh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/csh.py
  8778 1515103633.80265: Loading ShellModule 'fish' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/fish.py
  8778 1515103633.80300: Loading ShellModule 'powershell' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/powershell.py
  8778 1515103633.80355: Loading ShellModule 'sh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py
  8778 1515103633.80423: Loading ShellModule 'sh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
  8778 1515103633.80713: assigned :doc
  8778 1515103633.80833: Loading ActionModule 'aruba' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/action/aruba.py
  8778 1515103633.80901: starting attempt loop
  8778 1515103633.80959: running the handler
<deathstar> using connection plugin network_cli
  8778 1515103633.81102: Loading Connection 'persistent' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/connection/persistent.py
  8778 1515103633.81159: Loading ShellModule 'csh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/csh.py (found_in_cache=True, class_only=False)
  8778 1515103633.81231: Loading ShellModule 'fish' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/fish.py (found_in_cache=True, class_only=False)
  8778 1515103633.81277: Loading ShellModule 'powershell' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/powershell.py (found_in_cache=True, class_only=False)
  8778 1515103633.81417: Loading ShellModule 'sh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
  8778 1515103633.81492: Loading ShellModule 'sh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
  8778 1515103633.81788: assigned :doc
<deathstar> starting connection from persistent connection plugin
<deathstar> local domain socket does not exist, starting it
<deathstar> control socket path is /home/netadmin/.ansible/pc/f4a98c8a7b
Traceback (most recent call last):
  File "/home/netadmin/.local/bin/ansible-connection", line 72, in start
    self.connection._connect()
  File "/home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/connection/network_cli.py", line 315, in _connect
    self.receive()
  File "/home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/connection/network_cli.py", line 385, in receive
    data = self._ssh_shell.recv(256)
  File "/home/netadmin/.local/lib/python2.7/site-packages/paramiko/channel.py", line 685, in recv
    raise socket.timeout()
timeout

  8778 1515103665.95641: done running TaskExecutor() for deathstar/TASK: Gather running configs [080027f9-f3c3-a76b-087e-00000000002c]
  8778 1515103665.95716: sending task result for task 080027f9-f3c3-a76b-087e-00000000002c
  8778 1515103665.95777: done sending task result for task 080027f9-f3c3-a76b-087e-00000000002c
  8778 1515103665.95826: WORKER PROCESS EXITING
  8723 1515103665.96123: marking deathstar as failed
  8723 1515103665.96206: marking host deathstar failed, current state: HOST STATE: block=2, task=4, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
  8723 1515103665.96247: ^ failed state is now: HOST STATE: block=2, task=4, rescue=0, always=0, run_state=ITERATING_COMPLETE, fail_state=FAILED_TASKS, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
  8723 1515103665.96301: getting the next task for host deathstar
  8723 1515103665.96339: host deathstar is done iterating, returning
fatal: [deathstar]: FAILED! => {
    "msg": ""
}
  8723 1515103665.96505: no more pending results, returning what we have
  8723 1515103665.96549: results queue empty
  8723 1515103665.96623: checking for any_errors_fatal
  8723 1515103665.96683: done checking for any_errors_fatal
  8723 1515103665.96730: checking for max_fail_percentage
  8723 1515103665.96768: done checking for max_fail_percentage
  8723 1515103665.96832: checking to see if all hosts have failed and the running result is not ok
  8723 1515103665.96898: done checking to see if all hosts have failed
  8723 1515103665.96958: getting the remaining hosts for this loop
  8723 1515103665.96994: done getting the remaining hosts for this loop
  8723 1515103665.97043: building list of next tasks for hosts
  8723 1515103665.97088: getting the next task for host deathstar
  8723 1515103665.97134: host deathstar is done iterating, returning
  8723 1515103665.97173: done building task lists
  8723 1515103665.97183: counting tasks in each state of execution
  8723 1515103665.97202: done counting tasks in each state of execution:
        num_setups: 0
        num_tasks: 0
        num_rescue: 0
        num_always: 0
  8723 1515103665.97241: all hosts are done, so returning None's for all hosts
  8723 1515103665.97274: done queuing things up, now waiting for results queue to drain
  8723 1515103665.97297: results queue empty
  8723 1515103665.97321: checking for any_errors_fatal
  8723 1515103665.97333: done checking for any_errors_fatal
  8723 1515103665.97354: checking for max_fail_percentage
  8723 1515103665.97366: done checking for max_fail_percentage
  8723 1515103665.97377: checking to see if all hosts have failed and the running result is not ok
  8723 1515103665.97388: done checking to see if all hosts have failed
  8723 1515103665.97409: getting the next task for host deathstar
  8723 1515103665.97421: host deathstar is done iterating, returning
  8723 1515103665.97434: running handlers
        to retry, use: --limit @/home/netadmin/ansible/backup-switch-aruba.retry

PLAY RECAP **********************************************************************************************************************************************************************************************************************************
deathstar                  : ok=3    changed=0    unreachable=0    failed=1
```


Here is a new snippet from the `ansible.log`

```
2018-01-04 17:07:13,767 p=8723 u=netadmin |  TASK [Gather running configs] ***************************************************************************************************************************************************************************************************************
2018-01-04 17:07:13,767 p=8723 u=netadmin |  task path: /home/netadmin/ansible/backup-switch-aruba.yml:36
2018-01-04 17:07:13,767 p=8723 u=netadmin |    8723 1515103633.76755: sending task start callback
2018-01-04 17:07:13,767 p=8723 u=netadmin |    8723 1515103633.76768: entering _queue_task() for deathstar/aruba_command
2018-01-04 17:07:13,767 p=8723 u=netadmin |    8723 1515103633.76780: Creating lock for aruba_command
2018-01-04 17:07:13,770 p=8723 u=netadmin |    8723 1515103633.76958: worker is 1 (out of 1 available)
2018-01-04 17:07:13,770 p=8723 u=netadmin |    8723 1515103633.77043: exiting _queue_task() for deathstar/aruba_command
2018-01-04 17:07:13,771 p=8723 u=netadmin |    8723 1515103633.77123: done queuing things up, now waiting for results queue to drain
2018-01-04 17:07:13,772 p=8723 u=netadmin |    8723 1515103633.77168: waiting for pending results...
2018-01-04 17:07:13,778 p=8723 u=netadmin |    8778 1515103633.77713: running TaskExecutor() for deathstar/TASK: Gather running configs
2018-01-04 17:07:13,778 p=8723 u=netadmin |    8778 1515103633.77848: in run() - task 080027f9-f3c3-a76b-087e-00000000002c
2018-01-04 17:07:13,779 p=8723 u=netadmin |    8778 1515103633.77928: calling self._execute()
2018-01-04 17:07:13,782 p=8723 u=netadmin |    8778 1515103633.78162: Loading FilterModule 'core' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/core.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:13,782 p=8723 u=netadmin |    8778 1515103633.78212: Loading FilterModule 'ipaddr' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/ipaddr.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:13,783 p=8723 u=netadmin |    8778 1515103633.78277: Loading FilterModule 'json_query' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/json_query.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:13,783 p=8723 u=netadmin |    8778 1515103633.78331: Loading FilterModule 'mathstuff' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/mathstuff.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:13,784 p=8723 u=netadmin |    8778 1515103633.78407: Loading FilterModule 'network' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/network.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:13,785 p=8723 u=netadmin |    8778 1515103633.78458: Loading FilterModule 'urlsplit' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/urlsplit.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:13,786 p=8723 u=netadmin |    8778 1515103633.78588: Loading TestModule 'core' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/test/core.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:13,786 p=8723 u=netadmin |    8778 1515103633.78625: Loading TestModule 'files' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/test/files.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:13,787 p=8723 u=netadmin |    8778 1515103633.78670: Loading TestModule 'mathstuff' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/test/mathstuff.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:13,790 p=8723 u=netadmin |    8778 1515103633.78998: Loading FilterModule 'core' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/core.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:13,791 p=8723 u=netadmin |    8778 1515103633.79134: Loading FilterModule 'ipaddr' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/ipaddr.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:13,792 p=8723 u=netadmin |    8778 1515103633.79215: Loading FilterModule 'json_query' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/json_query.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:13,793 p=8723 u=netadmin |    8778 1515103633.79283: Loading FilterModule 'mathstuff' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/mathstuff.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:13,794 p=8723 u=netadmin |    8778 1515103633.79403: Loading FilterModule 'network' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/network.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:13,795 p=8723 u=netadmin |    8778 1515103633.79455: Loading FilterModule 'urlsplit' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/urlsplit.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:13,796 p=8723 u=netadmin |    8778 1515103633.79567: Loading TestModule 'core' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/test/core.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:13,796 p=8723 u=netadmin |    8778 1515103633.79635: Loading TestModule 'files' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/test/files.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:13,797 p=8723 u=netadmin |    8778 1515103633.79684: Loading TestModule 'mathstuff' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/test/mathstuff.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:13,801 p=8723 u=netadmin |    8778 1515103633.80064: Loading Connection 'local' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/connection/local.py
2018-01-04 17:07:13,802 p=8723 u=netadmin |    8778 1515103633.80189: Loading ShellModule 'csh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/csh.py
2018-01-04 17:07:13,802 p=8723 u=netadmin |    8778 1515103633.80265: Loading ShellModule 'fish' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/fish.py
2018-01-04 17:07:13,803 p=8723 u=netadmin |    8778 1515103633.80300: Loading ShellModule 'powershell' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/powershell.py
2018-01-04 17:07:13,804 p=8723 u=netadmin |    8778 1515103633.80355: Loading ShellModule 'sh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py
2018-01-04 17:07:13,804 p=8723 u=netadmin |    8778 1515103633.80423: Loading ShellModule 'sh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:13,807 p=8723 u=netadmin |    8778 1515103633.80713: assigned :doc
2018-01-04 17:07:13,808 p=8723 u=netadmin |    8778 1515103633.80833: Loading ActionModule 'aruba' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/action/aruba.py
2018-01-04 17:07:13,809 p=8723 u=netadmin |    8778 1515103633.80901: starting attempt loop
2018-01-04 17:07:13,810 p=8723 u=netadmin |    8778 1515103633.80959: running the handler
2018-01-04 17:07:13,811 p=8723 u=netadmin |    8778 1515103633.81102: Loading Connection 'persistent' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/connection/persistent.py
2018-01-04 17:07:13,812 p=8723 u=netadmin |    8778 1515103633.81159: Loading ShellModule 'csh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/csh.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:13,812 p=8723 u=netadmin |    8778 1515103633.81231: Loading ShellModule 'fish' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/fish.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:13,813 p=8723 u=netadmin |    8778 1515103633.81277: Loading ShellModule 'powershell' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/powershell.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:13,814 p=8723 u=netadmin |    8778 1515103633.81417: Loading ShellModule 'sh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:13,815 p=8723 u=netadmin |    8778 1515103633.81492: Loading ShellModule 'sh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:13,818 p=8723 u=netadmin |    8778 1515103633.81788: assigned :doc
2018-01-04 17:07:14,519 p=8779 u=netadmin |    8779 1515103634.51971: Loading Connection 'ssh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/connection/ssh.py (found_in_cache=False, class_only=True)
2018-01-04 17:07:14,543 p=8779 u=netadmin |    8779 1515103634.54365: assigned :doc
2018-01-04 17:07:14,544 p=8779 u=netadmin |    8779 1515103634.54447: Loaded config def from plugin (connection/ssh)
2018-01-04 17:07:14,548 p=8779 u=netadmin |    8788 1515103634.54832: Loading Connection 'network_cli' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/connection/network_cli.py
2018-01-04 17:07:14,550 p=8779 u=netadmin |    8788 1515103634.55050: Loading ShellModule 'csh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/csh.py
2018-01-04 17:07:14,551 p=8779 u=netadmin |    8788 1515103634.55103: Loading ShellModule 'fish' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/fish.py
2018-01-04 17:07:14,551 p=8779 u=netadmin |    8788 1515103634.55171: Loading ShellModule 'powershell' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/powershell.py
2018-01-04 17:07:14,551 p=8779 u=netadmin |    8788 1515103634.55181: Loading ShellModule 'sh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py
2018-01-04 17:07:14,551 p=8779 u=netadmin |    8788 1515103634.55188: Loading ShellModule 'sh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:14,552 p=8779 u=netadmin |    8788 1515103634.55224: Loading Connection 'local' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/connection/local.py
2018-01-04 17:07:14,552 p=8779 u=netadmin |    8788 1515103634.55242: Loading ShellModule 'csh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/csh.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:14,552 p=8779 u=netadmin |    8788 1515103634.55252: Loading ShellModule 'fish' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/fish.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:14,552 p=8779 u=netadmin |    8788 1515103634.55258: Loading ShellModule 'powershell' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/powershell.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:14,552 p=8779 u=netadmin |    8788 1515103634.55270: Loading ShellModule 'sh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:14,552 p=8779 u=netadmin |    8788 1515103634.55279: Loading ShellModule 'sh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:14,556 p=8779 u=netadmin |    8788 1515103634.55618: assigned :doc
2018-01-04 17:07:14,556 p=8779 u=netadmin |    8788 1515103634.55669: Loading Connection 'ssh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/connection/ssh.py (found_in_cache=True, class_only=True)
2018-01-04 17:07:14,568 p=8779 u=netadmin |    8788 1515103634.56878: assigned :doc
2018-01-04 17:07:14,570 p=8779 u=netadmin |    8788 1515103634.56993: Loaded config def from plugin (connection/ssh)
2018-01-04 17:07:14,574 p=8779 u=netadmin |    8788 1515103634.57440: assigned :doc
2018-01-04 17:07:14,574 p=8779 u=netadmin |    8788 1515103634.57478: Loaded config def from plugin (connection/network_cli)
2018-01-04 17:07:14,595 p=8779 u=netadmin |    8788 1515103634.59566: Loading Connection 'paramiko_ssh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/connection/paramiko_ssh.py
2018-01-04 17:07:14,596 p=8779 u=netadmin |    8788 1515103634.59604: Loading ShellModule 'csh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/csh.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:14,596 p=8779 u=netadmin |    8788 1515103634.59623: Loading ShellModule 'fish' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/fish.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:14,596 p=8779 u=netadmin |    8788 1515103634.59635: Loading ShellModule 'powershell' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/powershell.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:14,596 p=8779 u=netadmin |    8788 1515103634.59643: Loading ShellModule 'sh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:14,596 p=8779 u=netadmin |    8788 1515103634.59664: Loading ShellModule 'sh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2018-01-04 17:07:14,602 p=8779 u=netadmin |    8788 1515103634.60275: assigned :doc
2018-01-04 17:07:14,603 p=8779 u=netadmin |    8788 1515103634.60331: Loaded config def from plugin (connection/paramiko_ssh)
2018-01-04 17:07:14,606 paramiko.transport starting thread (client mode): 0x9f4ec250L
2018-01-04 17:07:14,606 paramiko.transport Local version/idstring: SSH-2.0-paramiko_2.4.0
2018-01-04 17:07:14,606 paramiko.transport Remote version/idstring: SSH-2.0-Mocana SSH 5.8
2018-01-04 17:07:14,606 paramiko.transport Connected (version 2.0, client Mocana)
2018-01-04 17:07:14,607 paramiko.transport kex algos:[u'diffie-hellman-group14-sha1'] server key:[u'ssh-rsa'] client encrypt:[u'aes256-ctr', u'aes256-cbc', u'rijndael-cbc@lysator.liu.se', u'aes192-ctr', u'aes192-cbc', u'aes128-ctr', u'aes128-cbc'] server encrypt:[u'aes256-ctr', u'aes256-cbc', u'rijndael-cbc@lysator.liu.se', u'aes192-ctr', u'aes192-cbc', u'aes128-ctr', u'aes128-cbc'] client mac:[u'hmac-sha1-96', u'hmac-md5', u'hmac-sha1', u'hmac-md5-96'] server mac:[u'hmac-sha1-96', u'hmac-md5', u'hmac-sha1', u'hmac-md5-96'] client compress:[u'none'] server compress:[u'none'] client lang:[u''] server lang:[u''] kex follows?False
2018-01-04 17:07:14,607 paramiko.transport Kex agreed: diffie-hellman-group14-sha1
2018-01-04 17:07:14,607 paramiko.transport HostKey agreed: ssh-rsa
2018-01-04 17:07:14,607 paramiko.transport Cipher agreed: aes128-ctr
2018-01-04 17:07:14,607 paramiko.transport MAC agreed: hmac-sha1
2018-01-04 17:07:14,607 paramiko.transport Compression agreed: none
2018-01-04 17:07:15,110 paramiko.transport kex engine KexGroup14 specified hash_algo <built-in function openssl_sha1>
2018-01-04 17:07:15,111 paramiko.transport Switch to new keys ...
2018-01-04 17:07:15,113 paramiko.transport userauth is OK
2018-01-04 17:07:15,117 paramiko.transport Auth banner: This is a private system
 Unauthorized access may result in civil and criminal penalties

2018-01-04 17:07:15,158 paramiko.transport Authentication (password) successful!
2018-01-04 17:07:15,176 paramiko.transport [chan 0] Max packet in: 32768 bytes
2018-01-04 17:07:15,223 paramiko.transport [chan 0] Max packet out: 32768 bytes
2018-01-04 17:07:15,223 paramiko.transport Secsh channel 0 opened.
2018-01-04 17:07:15,323 paramiko.transport [chan 0] Sesch channel 0 request ok
2018-01-04 17:07:15,424 paramiko.transport [chan 0] Sesch channel 0 request ok
2018-01-04 17:07:15,429 p=8779 u=netadmin |    8788 1515103635.42943: Loading TerminalModule 'aruba' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/terminal/aruba.py
2018-01-04 17:07:15,432 p=8779 u=netadmin |    8788 1515103635.43266: Loading Cliconf 'aruba' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/cliconf/aruba.py
2018-01-04 17:07:45,912 p=8779 u=netadmin |  shutdown complete
2018-01-04 17:07:45,955 p=8723 u=netadmin |  Traceback (most recent call last):
  File "/home/netadmin/.local/bin/ansible-connection", line 72, in start
    self.connection._connect()
  File "/home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/connection/network_cli.py", line 315, in _connect
    self.receive()
  File "/home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/connection/network_cli.py", line 385, in receive
    data = self._ssh_shell.recv(256)
  File "/home/netadmin/.local/lib/python2.7/site-packages/paramiko/channel.py", line 685, in recv
    raise socket.timeout()
timeout

2018-01-04 17:07:45,956 p=8723 u=netadmin |    8778 1515103665.95641: done running TaskExecutor() for deathstar/TASK: Gather running configs [080027f9-f3c3-a76b-087e-00000000002c]
2018-01-04 17:07:45,957 p=8723 u=netadmin |    8778 1515103665.95716: sending task result for task 080027f9-f3c3-a76b-087e-00000000002c
2018-01-04 17:07:45,957 p=8723 u=netadmin |    8778 1515103665.95777: done sending task result for task 080027f9-f3c3-a76b-087e-00000000002c
2018-01-04 17:07:45,958 p=8723 u=netadmin |    8778 1515103665.95826: WORKER PROCESS EXITING
2018-01-04 17:07:45,961 p=8723 u=netadmin |    8723 1515103665.96123: marking deathstar as failed
2018-01-04 17:07:45,962 p=8723 u=netadmin |    8723 1515103665.96206: marking host deathstar failed, current state: HOST STATE: block=2, task=4, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
2018-01-04 17:07:45,962 p=8723 u=netadmin |    8723 1515103665.96247: ^ failed state is now: HOST STATE: block=2, task=4, rescue=0, always=0, run_state=ITERATING_COMPLETE, fail_state=FAILED_TASKS, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
2018-01-04 17:07:45,963 p=8723 u=netadmin |    8723 1515103665.96301: getting the next task for host deathstar
2018-01-04 17:07:45,963 p=8723 u=netadmin |    8723 1515103665.96339: host deathstar is done iterating, returning
2018-01-04 17:07:45,964 p=8723 u=netadmin |  fatal: [deathstar]: FAILED! => {
    "msg": ""
}
2018-01-04 17:07:45,965 p=8723 u=netadmin |    8723 1515103665.96505: no more pending results, returning what we have
2018-01-04 17:07:45,966 p=8723 u=netadmin |    8723 1515103665.96549: results queue empty
2018-01-04 17:07:45,966 p=8723 u=netadmin |    8723 1515103665.96623: checking for any_errors_fatal
2018-01-04 17:07:45,967 p=8723 u=netadmin |    8723 1515103665.96683: done checking for any_errors_fatal
2018-01-04 17:07:45,967 p=8723 u=netadmin |    8723 1515103665.96730: checking for max_fail_percentage
2018-01-04 17:07:45,968 p=8723 u=netadmin |    8723 1515103665.96768: done checking for max_fail_percentage
2018-01-04 17:07:45,968 p=8723 u=netadmin |    8723 1515103665.96832: checking to see if all hosts have failed and the running result is not ok
2018-01-04 17:07:45,969 p=8723 u=netadmin |    8723 1515103665.96898: done checking to see if all hosts have failed
2018-01-04 17:07:45,969 p=8723 u=netadmin |    8723 1515103665.96958: getting the remaining hosts for this loop
2018-01-04 17:07:45,970 p=8723 u=netadmin |    8723 1515103665.96994: done getting the remaining hosts for this loop
2018-01-04 17:07:45,970 p=8723 u=netadmin |    8723 1515103665.97043: building list of next tasks for hosts
2018-01-04 17:07:45,971 p=8723 u=netadmin |    8723 1515103665.97088: getting the next task for host deathstar
2018-01-04 17:07:45,971 p=8723 u=netadmin |    8723 1515103665.97134: host deathstar is done iterating, returning
2018-01-04 17:07:45,971 p=8723 u=netadmin |    8723 1515103665.97173: done building task lists
2018-01-04 17:07:45,971 p=8723 u=netadmin |    8723 1515103665.97183: counting tasks in each state of execution
2018-01-04 17:07:45,972 p=8723 u=netadmin |    8723 1515103665.97202: done counting tasks in each state of execution:
        num_setups: 0
        num_tasks: 0
        num_rescue: 0
        num_always: 0
2018-01-04 17:07:45,972 p=8723 u=netadmin |    8723 1515103665.97241: all hosts are done, so returning None's for all hosts
2018-01-04 17:07:45,972 p=8723 u=netadmin |    8723 1515103665.97274: done queuing things up, now waiting for results queue to drain
2018-01-04 17:07:45,973 p=8723 u=netadmin |    8723 1515103665.97297: results queue empty
2018-01-04 17:07:45,973 p=8723 u=netadmin |    8723 1515103665.97321: checking for any_errors_fatal
2018-01-04 17:07:45,973 p=8723 u=netadmin |    8723 1515103665.97333: done checking for any_errors_fatal
2018-01-04 17:07:45,973 p=8723 u=netadmin |    8723 1515103665.97354: checking for max_fail_percentage
2018-01-04 17:07:45,973 p=8723 u=netadmin |    8723 1515103665.97366: done checking for max_fail_percentage
2018-01-04 17:07:45,973 p=8723 u=netadmin |    8723 1515103665.97377: checking to see if all hosts have failed and the running result is not ok
2018-01-04 17:07:45,974 p=8723 u=netadmin |    8723 1515103665.97388: done checking to see if all hosts have failed
2018-01-04 17:07:45,974 p=8723 u=netadmin |    8723 1515103665.97409: getting the next task for host deathstar
2018-01-04 17:07:45,974 p=8723 u=netadmin |    8723 1515103665.97421: host deathstar is done iterating, returning
2018-01-04 17:07:45,974 p=8723 u=netadmin |    8723 1515103665.97434: running handlers
2018-01-04 17:07:45,975 p=8723 u=netadmin |     to retry, use: --limit @/home/netadmin/ansible/backup-switch-aruba.retry

2018-01-04 17:07:45,976 paramiko.transport EOF in transport thread
2018-01-04 17:07:45,976 p=8723 u=netadmin |  PLAY RECAP **********************************************************************************************************************************************************************************************************************************
2018-01-04 17:07:45,977 p=8723 u=netadmin |  deathstar                  : ok=3    changed=0    unreachable=0    failed=1
2018-01-04 17:07:45,977 p=8723 u=netadmin |    8723 1515103665.97752: RUNNING CLEANUP
```
Sorry, I've been on vacation and haven't had time help with this. I still believe this is a parsing issue for the stdout / terminal. The TerminalModule and Cliconf load. After that the next thing is to find the prompt. I believe the regex needs tweaking or needs more options to parse out what other's are seeing at their prompts. 

I've added another regex from junos' terminal plugin that's a bit better at getting prompts. If you could, please try out this branch in my fork : 
https://github.com/jmighion/ansible/tree/aruba_prompt_test

Hi @jmighion thanks for the attention on this.

I'm new to git.  Do I manually apply your update to my `lib/ansible/plugins/terminal/aruba.py` file, or is there a programmatic approach?

If there's a cli method using `git` commands to apply your changes, then can you point me in the right direction please?  Thanks.
@thepackbot I would:
  1. Create a new virtual environment
  2. Use `git clone https://github.com/jmighion/ansible.git -b aruba_prompt_test`
  3. Use `pip install ansible/`
@jmcgill298 nice tip.  `virtualenv` is very cool.

Here's results of `ansible-playbook -vvvv` 

```
TASK [Gather running configs] **************************************************************************************************************************
task path: /home/netadmin/ansible-playbooks/aruba/backup-switch-aruba.yml:36
 10457 1515169284.59659: sending task start callback
 10457 1515169284.59705: entering _queue_task() for deathstar/aruba_command
 10457 1515169284.59743: Creating lock for aruba_command
 10457 1515169284.59873: worker is 1 (out of 1 available)
 10457 1515169284.59981: exiting _queue_task() for deathstar/aruba_command
 10457 1515169284.60132: done queuing things up, now waiting for results queue to drain
 10457 1515169284.60241: waiting for pending results...
 10512 1515169284.60585: running TaskExecutor() for deathstar/TASK: Gather running configs
 10512 1515169284.60704: in run() - task 080027f9-f3c3-9a40-fa36-00000000002d
 10512 1515169284.60772: calling self._execute()
 10512 1515169284.61069: Loading FilterModule 'core' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/filter/core.py (found_in_cache=True, class_only=False)
 10512 1515169284.61162: Loading FilterModule 'ipaddr' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/filter/ipaddr.py (found_in_cache=True, class_only=False)
 10512 1515169284.61204: Loading FilterModule 'json_query' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/filter/json_query.py (found_in_cache=True, class_only=False)
 10512 1515169284.61246: Loading FilterModule 'mathstuff' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/filter/mathstuff.py (found_in_cache=True, class_only=False)
 10512 1515169284.61272: Loading FilterModule 'network' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/filter/network.py (found_in_cache=True, class_only=False)
 10512 1515169284.61287: Loading FilterModule 'urlsplit' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/filter/urlsplit.py (found_in_cache=True, class_only=False)
 10512 1515169284.61331: Loading TestModule 'core' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/test/core.py (found_in_cache=True, class_only=False)
 10512 1515169284.61350: Loading TestModule 'files' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/test/files.py (found_in_cache=True, class_only=False)
 10512 1515169284.61366: Loading TestModule 'mathstuff' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/test/mathstuff.py (found_in_cache=True, class_only=False)
 10512 1515169284.61652: Loading FilterModule 'core' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/filter/core.py (found_in_cache=True, class_only=False)
 10512 1515169284.61761: Loading FilterModule 'ipaddr' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/filter/ipaddr.py (found_in_cache=True, class_only=False)
 10512 1515169284.61852: Loading FilterModule 'json_query' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/filter/json_query.py (found_in_cache=True, class_only=False)
 10512 1515169284.61896: Loading FilterModule 'mathstuff' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/filter/mathstuff.py (found_in_cache=True, class_only=False)
 10512 1515169284.62068: Loading FilterModule 'network' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/filter/network.py (found_in_cache=True, class_only=False)
 10512 1515169284.62114: Loading FilterModule 'urlsplit' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/filter/urlsplit.py (found_in_cache=True, class_only=False)
 10512 1515169284.62182: Loading TestModule 'core' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/test/core.py (found_in_cache=True, class_only=False)
 10512 1515169284.62222: Loading TestModule 'files' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/test/files.py (found_in_cache=True, class_only=False)
 10512 1515169284.62269: Loading TestModule 'mathstuff' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/test/mathstuff.py (found_in_cache=True, class_only=False)
 10512 1515169284.62690: Loading Connection 'local' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/connection/local.py
 10512 1515169284.62778: Loading ShellModule 'csh' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/csh.py
 10512 1515169284.62832: Loading ShellModule 'fish' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/fish.py
 10512 1515169284.62870: Loading ShellModule 'powershell' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/powershell.py
 10512 1515169284.62910: Loading ShellModule 'sh' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py
 10512 1515169284.62974: Loading ShellModule 'sh' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
 10512 1515169284.63399: assigned :doc
 10512 1515169284.63575: Loading ActionModule 'aruba' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/action/aruba.py
 10512 1515169284.63729: starting attempt loop
 10512 1515169284.63787: running the handler
<deathstar> using connection plugin network_cli
 10512 1515169284.63931: Loading Connection 'persistent' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/connection/persistent.py
 10512 1515169284.63971: Loading ShellModule 'csh' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/csh.py (found_in_cache=True, class_only=False)
 10512 1515169284.64089: Loading ShellModule 'fish' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/fish.py (found_in_cache=True, class_only=False)
 10512 1515169284.64186: Loading ShellModule 'powershell' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/powershell.py (found_in_cache=True, class_only=False)
 10512 1515169284.64242: Loading ShellModule 'sh' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
 10512 1515169284.64282: Loading ShellModule 'sh' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
 10512 1515169284.64486: assigned :doc
<deathstar> starting connection from persistent connection plugin
<deathstar> local domain socket does not exist, starting it
<deathstar> control socket path is /home/netadmin/.ansible/pc/072bdf8b21
Traceback (most recent call last):
  File "/home/netadmin/virtualenv-ansbile/bin/ansible-connection", line 72, in start
    self.connection._connect()
  File "/home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/connection/network_cli.py", line 315, in _connect
    self.receive()
  File "/home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/connection/network_cli.py", line 385, in receive
    data = self._ssh_shell.recv(256)
  File "/home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/paramiko/channel.py", line 685, in recv
    raise socket.timeout()
timeout

 10512 1515169316.87654: done running TaskExecutor() for deathstar/TASK: Gather running configs [080027f9-f3c3-9a40-fa36-00000000002d]
 10512 1515169316.87758: sending task result for task 080027f9-f3c3-9a40-fa36-00000000002d
 10512 1515169316.87898: done sending task result for task 080027f9-f3c3-9a40-fa36-00000000002d
 10512 1515169316.87961: WORKER PROCESS EXITING
 10457 1515169316.88360: marking deathstar as failed
 10457 1515169316.88480: marking host deathstar failed, current state: HOST STATE: block=2, task=4, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
 10457 1515169316.88542: ^ failed state is now: HOST STATE: block=2, task=4, rescue=0, always=0, run_state=ITERATING_COMPLETE, fail_state=FAILED_TASKS, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
 10457 1515169316.88641: getting the next task for host deathstar
 10457 1515169316.88723: host deathstar is done iterating, returning
fatal: [deathstar]: FAILED! => {
    "msg": ""
}
 10457 1515169316.89036: no more pending results, returning what we have
 10457 1515169316.89106: results queue empty
 10457 1515169316.89234: checking for any_errors_fatal
 10457 1515169316.89285: done checking for any_errors_fatal
 10457 1515169316.89340: checking for max_fail_percentage
 10457 1515169316.89389: done checking for max_fail_percentage
 10457 1515169316.89445: checking to see if all hosts have failed and the running result is not ok
 10457 1515169316.89507: done checking to see if all hosts have failed
 10457 1515169316.89573: getting the remaining hosts for this loop
 10457 1515169316.89621: done getting the remaining hosts for this loop
 10457 1515169316.89674: building list of next tasks for hosts
 10457 1515169316.89720: getting the next task for host deathstar
 10457 1515169316.89766: host deathstar is done iterating, returning
 10457 1515169316.89802: done building task lists
 10457 1515169316.89847: counting tasks in each state of execution
 10457 1515169316.89892: done counting tasks in each state of execution:
        num_setups: 0
        num_tasks: 0
        num_rescue: 0
        num_always: 0
 10457 1515169316.89934: all hosts are done, so returning None's for all hosts
 10457 1515169316.90005: done queuing things up, now waiting for results queue to drain
 10457 1515169316.90046: results queue empty
 10457 1515169316.90098: checking for any_errors_fatal
 10457 1515169316.90288: done checking for any_errors_fatal
 10457 1515169316.90399: checking for max_fail_percentage
 10457 1515169316.90492: done checking for max_fail_percentage
 10457 1515169316.90593: checking to see if all hosts have failed and the running result is not ok
 10457 1515169316.90669: done checking to see if all hosts have failed
 10457 1515169316.90744: getting the next task for host deathstar
 10457 1515169316.90790: host deathstar is done iterating, returning
 10457 1515169316.90848: running handlers
        to retry, use: --limit @/home/netadmin/ansible-playbooks/aruba/backup-switch-aruba.retry

PLAY RECAP *********************************************************************************************************************************************
deathstar                  : ok=3    changed=0    unreachable=0    failed=1
```


Here is the new ansible.log entries

```
2018-01-05 11:21:24,595 p=10457 u=netadmin |  TASK [Gather running configs] **************************************************************************************************************************
2018-01-05 11:21:24,596 p=10457 u=netadmin |  task path: /home/netadmin/ansible-playbooks/aruba/backup-switch-aruba.yml:36
2018-01-05 11:21:24,596 p=10457 u=netadmin |   10457 1515169284.59659: sending task start callback
2018-01-05 11:21:24,597 p=10457 u=netadmin |   10457 1515169284.59705: entering _queue_task() for deathstar/aruba_command
2018-01-05 11:21:24,597 p=10457 u=netadmin |   10457 1515169284.59743: Creating lock for aruba_command
2018-01-05 11:21:24,599 p=10457 u=netadmin |   10457 1515169284.59873: worker is 1 (out of 1 available)
2018-01-05 11:21:24,600 p=10457 u=netadmin |   10457 1515169284.59981: exiting _queue_task() for deathstar/aruba_command
2018-01-05 11:21:24,602 p=10457 u=netadmin |   10457 1515169284.60132: done queuing things up, now waiting for results queue to drain
2018-01-05 11:21:24,603 p=10457 u=netadmin |   10457 1515169284.60241: waiting for pending results...
2018-01-05 11:21:24,606 p=10457 u=netadmin |   10512 1515169284.60585: running TaskExecutor() for deathstar/TASK: Gather running configs
2018-01-05 11:21:24,607 p=10457 u=netadmin |   10512 1515169284.60704: in run() - task 080027f9-f3c3-9a40-fa36-00000000002d
2018-01-05 11:21:24,608 p=10457 u=netadmin |   10512 1515169284.60772: calling self._execute()
2018-01-05 11:21:24,611 p=10457 u=netadmin |   10512 1515169284.61069: Loading FilterModule 'core' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/filter/core.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:24,611 p=10457 u=netadmin |   10512 1515169284.61162: Loading FilterModule 'ipaddr' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/filter/ipaddr.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:24,612 p=10457 u=netadmin |   10512 1515169284.61204: Loading FilterModule 'json_query' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/filter/json_query.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:24,612 p=10457 u=netadmin |   10512 1515169284.61246: Loading FilterModule 'mathstuff' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/filter/mathstuff.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:24,612 p=10457 u=netadmin |   10512 1515169284.61272: Loading FilterModule 'network' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/filter/network.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:24,612 p=10457 u=netadmin |   10512 1515169284.61287: Loading FilterModule 'urlsplit' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/filter/urlsplit.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:24,613 p=10457 u=netadmin |   10512 1515169284.61331: Loading TestModule 'core' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/test/core.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:24,613 p=10457 u=netadmin |   10512 1515169284.61350: Loading TestModule 'files' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/test/files.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:24,613 p=10457 u=netadmin |   10512 1515169284.61366: Loading TestModule 'mathstuff' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/test/mathstuff.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:24,617 p=10457 u=netadmin |   10512 1515169284.61652: Loading FilterModule 'core' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/filter/core.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:24,618 p=10457 u=netadmin |   10512 1515169284.61761: Loading FilterModule 'ipaddr' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/filter/ipaddr.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:24,618 p=10457 u=netadmin |   10512 1515169284.61852: Loading FilterModule 'json_query' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/filter/json_query.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:24,620 p=10457 u=netadmin |   10512 1515169284.61896: Loading FilterModule 'mathstuff' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/filter/mathstuff.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:24,621 p=10457 u=netadmin |   10512 1515169284.62068: Loading FilterModule 'network' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/filter/network.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:24,621 p=10457 u=netadmin |   10512 1515169284.62114: Loading FilterModule 'urlsplit' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/filter/urlsplit.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:24,622 p=10457 u=netadmin |   10512 1515169284.62182: Loading TestModule 'core' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/test/core.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:24,622 p=10457 u=netadmin |   10512 1515169284.62222: Loading TestModule 'files' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/test/files.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:24,622 p=10457 u=netadmin |   10512 1515169284.62269: Loading TestModule 'mathstuff' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/test/mathstuff.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:24,627 p=10457 u=netadmin |   10512 1515169284.62690: Loading Connection 'local' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/connection/local.py
2018-01-05 11:21:24,627 p=10457 u=netadmin |   10512 1515169284.62778: Loading ShellModule 'csh' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/csh.py
2018-01-05 11:21:24,628 p=10457 u=netadmin |   10512 1515169284.62832: Loading ShellModule 'fish' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/fish.py
2018-01-05 11:21:24,629 p=10457 u=netadmin |   10512 1515169284.62870: Loading ShellModule 'powershell' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/powershell.py
2018-01-05 11:21:24,629 p=10457 u=netadmin |   10512 1515169284.62910: Loading ShellModule 'sh' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py
2018-01-05 11:21:24,630 p=10457 u=netadmin |   10512 1515169284.62974: Loading ShellModule 'sh' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:24,634 p=10457 u=netadmin |   10512 1515169284.63399: assigned :doc
2018-01-05 11:21:24,637 p=10457 u=netadmin |   10512 1515169284.63575: Loading ActionModule 'aruba' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/action/aruba.py
2018-01-05 11:21:24,637 p=10457 u=netadmin |   10512 1515169284.63729: starting attempt loop
2018-01-05 11:21:24,638 p=10457 u=netadmin |   10512 1515169284.63787: running the handler
2018-01-05 11:21:24,639 p=10457 u=netadmin |   10512 1515169284.63931: Loading Connection 'persistent' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/connection/persistent.py
2018-01-05 11:21:24,640 p=10457 u=netadmin |   10512 1515169284.63971: Loading ShellModule 'csh' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/csh.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:24,641 p=10457 u=netadmin |   10512 1515169284.64089: Loading ShellModule 'fish' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/fish.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:24,642 p=10457 u=netadmin |   10512 1515169284.64186: Loading ShellModule 'powershell' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/powershell.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:24,642 p=10457 u=netadmin |   10512 1515169284.64242: Loading ShellModule 'sh' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:24,643 p=10457 u=netadmin |   10512 1515169284.64282: Loading ShellModule 'sh' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:24,645 p=10457 u=netadmin |   10512 1515169284.64486: assigned :doc
2018-01-05 11:21:25,343 p=10513 u=netadmin |   10513 1515169285.34350: Loading Connection 'ssh' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/connection/ssh.py (found_in_cache=False, class_only=True)
2018-01-05 11:21:25,398 p=10513 u=netadmin |   10513 1515169285.39859: assigned :doc
2018-01-05 11:21:25,399 p=10513 u=netadmin |   10513 1515169285.39892: Loaded config def from plugin (connection/ssh)
2018-01-05 11:21:25,405 p=10513 u=netadmin |   10522 1515169285.40478: Loading Connection 'network_cli' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/connection/network_cli.py
2018-01-05 11:21:25,407 p=10513 u=netadmin |   10522 1515169285.40695: Loading ShellModule 'csh' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/csh.py
2018-01-05 11:21:25,407 p=10513 u=netadmin |   10522 1515169285.40733: Loading ShellModule 'fish' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/fish.py
2018-01-05 11:21:25,407 p=10513 u=netadmin |   10522 1515169285.40795: Loading ShellModule 'powershell' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/powershell.py
2018-01-05 11:21:25,408 p=10513 u=netadmin |   10522 1515169285.40808: Loading ShellModule 'sh' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py
2018-01-05 11:21:25,408 p=10513 u=netadmin |   10522 1515169285.40838: Loading ShellModule 'sh' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:25,409 p=10513 u=netadmin |   10522 1515169285.40912: Loading Connection 'local' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/connection/local.py
2018-01-05 11:21:25,409 p=10513 u=netadmin |   10522 1515169285.40937: Loading ShellModule 'csh' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/csh.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:25,409 p=10513 u=netadmin |   10522 1515169285.40959: Loading ShellModule 'fish' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/fish.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:25,409 p=10513 u=netadmin |   10522 1515169285.40975: Loading ShellModule 'powershell' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/powershell.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:25,409 p=10513 u=netadmin |   10522 1515169285.40983: Loading ShellModule 'sh' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:25,410 p=10513 u=netadmin |   10522 1515169285.41001: Loading ShellModule 'sh' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:25,413 p=10513 u=netadmin |   10522 1515169285.41365: assigned :doc
2018-01-05 11:21:25,413 p=10513 u=netadmin |   10522 1515169285.41394: Loading Connection 'ssh' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/connection/ssh.py (found_in_cache=True, class_only=True)
2018-01-05 11:21:25,458 p=10513 u=netadmin |   10522 1515169285.45798: assigned :doc
2018-01-05 11:21:25,459 p=10513 u=netadmin |   10522 1515169285.45899: Loaded config def from plugin (connection/ssh)
2018-01-05 11:21:25,485 p=10513 u=netadmin |   10522 1515169285.48487: assigned :doc
2018-01-05 11:21:25,485 p=10513 u=netadmin |   10522 1515169285.48559: Loaded config def from plugin (connection/network_cli)
2018-01-05 11:21:25,506 p=10513 u=netadmin |   10522 1515169285.50612: Loading Connection 'paramiko_ssh' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/connection/paramiko_ssh.py
2018-01-05 11:21:25,506 p=10513 u=netadmin |   10522 1515169285.50640: Loading ShellModule 'csh' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/csh.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:25,506 p=10513 u=netadmin |   10522 1515169285.50649: Loading ShellModule 'fish' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/fish.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:25,506 p=10513 u=netadmin |   10522 1515169285.50649: Loading ShellModule 'powershell' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/powershell.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:25,506 p=10513 u=netadmin |   10522 1515169285.50653: Loading ShellModule 'sh' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:25,506 p=10513 u=netadmin |   10522 1515169285.50661: Loading ShellModule 'sh' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2018-01-05 11:21:25,533 p=10513 u=netadmin |   10522 1515169285.53336: assigned :doc
2018-01-05 11:21:25,534 p=10513 u=netadmin |   10522 1515169285.53402: Loaded config def from plugin (connection/paramiko_ssh)
2018-01-05 11:21:25,538 paramiko.transport starting thread (client mode): 0xd960b890L
2018-01-05 11:21:25,538 paramiko.transport Local version/idstring: SSH-2.0-paramiko_2.4.0
2018-01-05 11:21:25,538 paramiko.transport Remote version/idstring: SSH-2.0-Mocana SSH 5.8
2018-01-05 11:21:25,538 paramiko.transport Connected (version 2.0, client Mocana)
2018-01-05 11:21:25,539 paramiko.transport kex algos:[u'diffie-hellman-group14-sha1'] server key:[u'ssh-rsa'] client encrypt:[u'aes256-ctr', u'aes256-cbc', u'rijndael-cbc@lysator.liu.se', u'aes192-ctr', u'aes192-cbc', u'aes128-ctr', u'aes128-cbc'] server encrypt:[u'aes256-ctr', u'aes256-cbc', u'rijndael-cbc@lysator.liu.se', u'aes192-ctr', u'aes192-cbc', u'aes128-ctr', u'aes128-cbc'] client mac:[u'hmac-sha1-96', u'hmac-md5', u'hmac-sha1', u'hmac-md5-96'] server mac:[u'hmac-sha1-96', u'hmac-md5', u'hmac-sha1', u'hmac-md5-96'] client compress:[u'none'] server compress:[u'none'] client lang:[u''] server lang:[u''] kex follows?False
2018-01-05 11:21:25,539 paramiko.transport Kex agreed: diffie-hellman-group14-sha1
2018-01-05 11:21:25,539 paramiko.transport HostKey agreed: ssh-rsa
2018-01-05 11:21:25,540 paramiko.transport Cipher agreed: aes128-ctr
2018-01-05 11:21:25,540 paramiko.transport MAC agreed: hmac-sha1
2018-01-05 11:21:25,540 paramiko.transport Compression agreed: none
2018-01-05 11:21:26,031 paramiko.transport kex engine KexGroup14 specified hash_algo <built-in function openssl_sha1>
2018-01-05 11:21:26,034 paramiko.transport Switch to new keys ...
2018-01-05 11:21:26,040 paramiko.transport userauth is OK
2018-01-05 11:21:26,043 paramiko.transport Auth banner: This is a private system
 Unauthorized access may result in civil and criminal penalties

2018-01-05 11:21:26,085 paramiko.transport Authentication (password) successful!
2018-01-05 11:21:26,102 paramiko.transport [chan 0] Max packet in: 32768 bytes
2018-01-05 11:21:26,152 paramiko.transport [chan 0] Max packet out: 32768 bytes
2018-01-05 11:21:26,152 paramiko.transport Secsh channel 0 opened.
2018-01-05 11:21:26,252 paramiko.transport [chan 0] Sesch channel 0 request ok
2018-01-05 11:21:26,353 paramiko.transport [chan 0] Sesch channel 0 request ok
2018-01-05 11:21:26,355 p=10513 u=netadmin |   10522 1515169286.35583: Loading TerminalModule 'aruba' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/terminal/aruba.py
2018-01-05 11:21:26,357 p=10513 u=netadmin |   10522 1515169286.35768: Loading Cliconf 'aruba' from /home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/cliconf/aruba.py
2018-01-05 11:21:56,841 p=10513 u=netadmin |  shutdown complete
2018-01-05 11:21:56,875 p=10457 u=netadmin |  Traceback (most recent call last):
  File "/home/netadmin/virtualenv-ansbile/bin/ansible-connection", line 72, in start
    self.connection._connect()
  File "/home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/connection/network_cli.py", line 315, in _connect
    self.receive()
  File "/home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/ansible/plugins/connection/network_cli.py", line 385, in receive
    data = self._ssh_shell.recv(256)
  File "/home/netadmin/virtualenv-ansbile/local/lib/python2.7/site-packages/paramiko/channel.py", line 685, in recv
    raise socket.timeout()
timeout

2018-01-05 11:21:56,877 p=10457 u=netadmin |   10512 1515169316.87654: done running TaskExecutor() for deathstar/TASK: Gather running configs [080027f9-f3c3-9a40-fa36-00000000002d]
2018-01-05 11:21:56,878 p=10457 u=netadmin |   10512 1515169316.87758: sending task result for task 080027f9-f3c3-9a40-fa36-00000000002d
2018-01-05 11:21:56,879 p=10457 u=netadmin |   10512 1515169316.87898: done sending task result for task 080027f9-f3c3-9a40-fa36-00000000002d
2018-01-05 11:21:56,880 p=10457 u=netadmin |   10512 1515169316.87961: WORKER PROCESS EXITING
2018-01-05 11:21:56,884 p=10457 u=netadmin |   10457 1515169316.88360: marking deathstar as failed
2018-01-05 11:21:56,885 p=10457 u=netadmin |   10457 1515169316.88480: marking host deathstar failed, current state: HOST STATE: block=2, task=4, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
2018-01-05 11:21:56,886 p=10457 u=netadmin |   10457 1515169316.88542: ^ failed state is now: HOST STATE: block=2, task=4, rescue=0, always=0, run_state=ITERATING_COMPLETE, fail_state=FAILED_TASKS, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
2018-01-05 11:21:56,886 p=10457 u=netadmin |   10457 1515169316.88641: getting the next task for host deathstar
2018-01-05 11:21:56,888 paramiko.transport EOF in transport thread
2018-01-05 11:21:56,888 p=10457 u=netadmin |   10457 1515169316.88723: host deathstar is done iterating, returning
2018-01-05 11:21:56,890 p=10457 u=netadmin |  fatal: [deathstar]: FAILED! => {
    "msg": ""
}
2018-01-05 11:21:56,890 p=10457 u=netadmin |   10457 1515169316.89036: no more pending results, returning what we have
2018-01-05 11:21:56,892 p=10457 u=netadmin |   10457 1515169316.89106: results queue empty
2018-01-05 11:21:56,892 p=10457 u=netadmin |   10457 1515169316.89234: checking for any_errors_fatal
2018-01-05 11:21:56,893 p=10457 u=netadmin |   10457 1515169316.89285: done checking for any_errors_fatal
2018-01-05 11:21:56,893 p=10457 u=netadmin |   10457 1515169316.89340: checking for max_fail_percentage
2018-01-05 11:21:56,894 p=10457 u=netadmin |   10457 1515169316.89389: done checking for max_fail_percentage
2018-01-05 11:21:56,894 p=10457 u=netadmin |   10457 1515169316.89445: checking to see if all hosts have failed and the running result is not ok
2018-01-05 11:21:56,895 p=10457 u=netadmin |   10457 1515169316.89507: done checking to see if all hosts have failed
2018-01-05 11:21:56,896 p=10457 u=netadmin |   10457 1515169316.89573: getting the remaining hosts for this loop
2018-01-05 11:21:56,896 p=10457 u=netadmin |   10457 1515169316.89621: done getting the remaining hosts for this loop
2018-01-05 11:21:56,897 p=10457 u=netadmin |   10457 1515169316.89674: building list of next tasks for hosts
2018-01-05 11:21:56,897 p=10457 u=netadmin |   10457 1515169316.89720: getting the next task for host deathstar
2018-01-05 11:21:56,897 p=10457 u=netadmin |   10457 1515169316.89766: host deathstar is done iterating, returning
2018-01-05 11:21:56,898 p=10457 u=netadmin |   10457 1515169316.89802: done building task lists
2018-01-05 11:21:56,898 p=10457 u=netadmin |   10457 1515169316.89847: counting tasks in each state of execution
2018-01-05 11:21:56,899 p=10457 u=netadmin |   10457 1515169316.89892: done counting tasks in each state of execution:
        num_setups: 0
        num_tasks: 0
        num_rescue: 0
        num_always: 0
2018-01-05 11:21:56,899 p=10457 u=netadmin |   10457 1515169316.89934: all hosts are done, so returning None's for all hosts
2018-01-05 11:21:56,900 p=10457 u=netadmin |   10457 1515169316.90005: done queuing things up, now waiting for results queue to drain
2018-01-05 11:21:56,900 p=10457 u=netadmin |   10457 1515169316.90046: results queue empty
2018-01-05 11:21:56,902 p=10457 u=netadmin |   10457 1515169316.90098: checking for any_errors_fatal
2018-01-05 11:21:56,903 p=10457 u=netadmin |   10457 1515169316.90288: done checking for any_errors_fatal
2018-01-05 11:21:56,904 p=10457 u=netadmin |   10457 1515169316.90399: checking for max_fail_percentage
2018-01-05 11:21:56,905 p=10457 u=netadmin |   10457 1515169316.90492: done checking for max_fail_percentage
2018-01-05 11:21:56,906 p=10457 u=netadmin |   10457 1515169316.90593: checking to see if all hosts have failed and the running result is not ok
2018-01-05 11:21:56,907 p=10457 u=netadmin |   10457 1515169316.90669: done checking to see if all hosts have failed
2018-01-05 11:21:56,907 p=10457 u=netadmin |   10457 1515169316.90744: getting the next task for host deathstar
2018-01-05 11:21:56,908 p=10457 u=netadmin |   10457 1515169316.90790: host deathstar is done iterating, returning
2018-01-05 11:21:56,908 p=10457 u=netadmin |   10457 1515169316.90848: running handlers
2018-01-05 11:21:56,911 p=10457 u=netadmin |    to retry, use: --limit @/home/netadmin/ansible-playbooks/aruba/backup-switch-aruba.retry

2018-01-05 11:21:56,916 p=10457 u=netadmin |  PLAY RECAP *********************************************************************************************************************************************
2018-01-05 11:21:56,917 p=10457 u=netadmin |  deathstar                  : ok=3    changed=0    unreachable=0    failed=1
```


By the way this is what the switch prompt looks like after logging in with PuTTY

```
login as: USERNAME
This is a private system
 Unauthorized access may result in civil and criminal penalties
USERNAME@x.x.x.x's password:
Your previous successful login (as manager) was on 2018-01-05 16:21:28
 from x.x.x.x





















SW-DeathStar8212#
```

Hmm the 3rd regex should've gotten that : 
```
(?<=\s)[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?\s*#\s*$
```
https://regex101.com/r/aS9b8C/1

Without knowing what's truly coming through the socket, it's hard to say what it's timing out on. When I dev on this I add extra logging to network_cli, which has helped for odd logins or hanging prompts. 
```
display.display("window : %s" % window)
```
Putting that after https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/connection/network_cli.py#L395 will print to the log everything coming through the socket that is then evaluated for prompts or errors. I definitely do not recommend doing this outside of a safe dev env because all info on the socket gets logged.
@jmighion yes I see that the regex matches.

I tried this against some newer hardware, but this failed too :(

Aruba 2530-24G-PoE+
Mfg. Part: J9773A
Software revision  : YA.16.03.0003

`-vvvv` output around failure:

```
TASK [Gather running configs] ***************************************************************************************************************************************************************************************************************
task path: /home/netadmin/ansible-playbooks/aruba/backup-switch-aruba.yml:36
 12230 1515189118.44509: sending task start callback
 12230 1515189118.44547: entering _queue_task() for aob-1f-mdf/aruba_command
 12230 1515189118.44583: Creating lock for aruba_command
 12230 1515189118.44705: worker is 1 (out of 1 available)
 12230 1515189118.44767: exiting _queue_task() for aob-1f-mdf/aruba_command
 12230 1515189118.44837: done queuing things up, now waiting for results queue to drain
 12230 1515189118.44881: waiting for pending results...
 12285 1515189118.45409: running TaskExecutor() for aob-1f-mdf/TASK: Gather running configs
 12285 1515189118.45602: in run() - task 080027f9-f3c3-9886-a06b-00000000002d
 12285 1515189118.45713: calling self._execute()
 12285 1515189118.46021: Loading FilterModule 'core' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/core.py (found_in_cache=True, class_only=False)
 12285 1515189118.46127: Loading FilterModule 'ipaddr' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/ipaddr.py (found_in_cache=True, class_only=False)
 12285 1515189118.46161: Loading FilterModule 'json_query' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/json_query.py (found_in_cache=True, class_only=False)
 12285 1515189118.46187: Loading FilterModule 'mathstuff' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/mathstuff.py (found_in_cache=True, class_only=False)
 12285 1515189118.46202: Loading FilterModule 'network' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/network.py (found_in_cache=True, class_only=False)
 12285 1515189118.46216: Loading FilterModule 'urlsplit' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/urlsplit.py (found_in_cache=True, class_only=False)
 12285 1515189118.46297: Loading TestModule 'core' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/test/core.py (found_in_cache=True, class_only=False)
 12285 1515189118.46333: Loading TestModule 'files' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/test/files.py (found_in_cache=True, class_only=False)
 12285 1515189118.46369: Loading TestModule 'mathstuff' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/test/mathstuff.py (found_in_cache=True, class_only=False)
 12285 1515189118.46573: Loading FilterModule 'core' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/core.py (found_in_cache=True, class_only=False)
 12285 1515189118.46603: Loading FilterModule 'ipaddr' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/ipaddr.py (found_in_cache=True, class_only=False)
 12285 1515189118.46643: Loading FilterModule 'json_query' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/json_query.py (found_in_cache=True, class_only=False)
 12285 1515189118.46677: Loading FilterModule 'mathstuff' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/mathstuff.py (found_in_cache=True, class_only=False)
 12285 1515189118.46725: Loading FilterModule 'network' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/network.py (found_in_cache=True, class_only=False)
 12285 1515189118.46800: Loading FilterModule 'urlsplit' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/urlsplit.py (found_in_cache=True, class_only=False)
 12285 1515189118.46966: Loading TestModule 'core' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/test/core.py (found_in_cache=True, class_only=False)
 12285 1515189118.47005: Loading TestModule 'files' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/test/files.py (found_in_cache=True, class_only=False)
 12285 1515189118.47049: Loading TestModule 'mathstuff' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/test/mathstuff.py (found_in_cache=True, class_only=False)
 12285 1515189118.47500: Loading Connection 'local' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/connection/local.py
 12285 1515189118.47622: Loading ShellModule 'csh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/csh.py
 12285 1515189118.47716: Loading ShellModule 'fish' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/fish.py
 12285 1515189118.47767: Loading ShellModule 'powershell' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/powershell.py
 12285 1515189118.47822: Loading ShellModule 'sh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py
 12285 1515189118.47896: Loading ShellModule 'sh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
 12285 1515189118.48183: assigned :doc
 12285 1515189118.48333: Loading ActionModule 'aruba' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/action/aruba.py
 12285 1515189118.48444: starting attempt loop
 12285 1515189118.48632: running the handler
<aob-1f-mdf> using connection plugin network_cli
 12285 1515189118.48832: Loading Connection 'persistent' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/connection/persistent.py
 12285 1515189118.48925: Loading ShellModule 'csh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/csh.py (found_in_cache=True, class_only=False)
 12285 1515189118.49002: Loading ShellModule 'fish' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/fish.py (found_in_cache=True, class_only=False)
 12285 1515189118.49090: Loading ShellModule 'powershell' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/powershell.py (found_in_cache=True, class_only=False)
 12285 1515189118.49125: Loading ShellModule 'sh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
 12285 1515189118.49152: Loading ShellModule 'sh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
 12285 1515189118.49389: assigned :doc
<aob-1f-mdf> starting connection from persistent connection plugin
<aob-1f-mdf> local domain socket does not exist, starting it
<aob-1f-mdf> control socket path is /home/netadmin/.ansible/pc/fc2ffd1375
Traceback (most recent call last):
  File "/home/netadmin/.local/bin/ansible-connection", line 72, in start
    self.connection._connect()
  File "/home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/connection/network_cli.py", line 315, in _connect
    self.receive()
  File "/home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/connection/network_cli.py", line 385, in receive
    data = self._ssh_shell.recv(256)
  File "/home/netadmin/.local/lib/python2.7/site-packages/paramiko/channel.py", line 685, in recv
    raise socket.timeout()
timeout

 12285 1515189151.06178: done running TaskExecutor() for aob-1f-mdf/TASK: Gather running configs [080027f9-f3c3-9886-a06b-00000000002d]
 12285 1515189151.06251: sending task result for task 080027f9-f3c3-9886-a06b-00000000002d
 12285 1515189151.06327: done sending task result for task 080027f9-f3c3-9886-a06b-00000000002d
 12285 1515189151.06715: WORKER PROCESS EXITING
 12230 1515189151.06906: marking aob-1f-mdf as failed
 12230 1515189151.07049: marking host aob-1f-mdf failed, current state: HOST STATE: block=2, task=4, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
 12230 1515189151.07101: ^ failed state is now: HOST STATE: block=2, task=4, rescue=0, always=0, run_state=ITERATING_COMPLETE, fail_state=FAILED_TASKS, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
 12230 1515189151.07175: getting the next task for host aob-1f-mdf
 12230 1515189151.07225: host aob-1f-mdf is done iterating, returning
fatal: [aob-1f-mdf]: FAILED! => {
    "msg": ""
}
 12230 1515189151.07345: no more pending results, returning what we have
 12230 1515189151.07401: results queue empty
 12230 1515189151.07431: checking for any_errors_fatal
 12230 1515189151.07478: done checking for any_errors_fatal
 12230 1515189151.07963: checking for max_fail_percentage
 12230 1515189151.08014: done checking for max_fail_percentage
 12230 1515189151.08080: checking to see if all hosts have failed and the running result is not ok
 12230 1515189151.08142: done checking to see if all hosts have failed
 12230 1515189151.08189: getting the remaining hosts for this loop
 12230 1515189151.08238: done getting the remaining hosts for this loop
 12230 1515189151.08280: building list of next tasks for hosts
 12230 1515189151.08327: getting the next task for host aob-1f-mdf
 12230 1515189151.08410: host aob-1f-mdf is done iterating, returning
 12230 1515189151.08768: done building task lists
 12230 1515189151.08827: counting tasks in each state of execution
 12230 1515189151.08897: done counting tasks in each state of execution:
        num_setups: 0
        num_tasks: 0
        num_rescue: 0
        num_always: 0
 12230 1515189151.09119: all hosts are done, so returning None's for all hosts
 12230 1515189151.09182: done queuing things up, now waiting for results queue to drain
 12230 1515189151.09251: results queue empty
 12230 1515189151.10003: checking for any_errors_fatal
 12230 1515189151.10113: done checking for any_errors_fatal
 12230 1515189151.10204: checking for max_fail_percentage
 12230 1515189151.10294: done checking for max_fail_percentage
 12230 1515189151.10372: checking to see if all hosts have failed and the running result is not ok
 12230 1515189151.10427: done checking to see if all hosts have failed
 12230 1515189151.10484: getting the next task for host aob-1f-mdf
 12230 1515189151.10537: host aob-1f-mdf is done iterating, returning
 12230 1515189151.10587: running handlers
        to retry, use: --limit @/home/netadmin/ansible-playbooks/aruba/backup-switch-aruba.retry

PLAY RECAP **********************************************************************************************************************************************************************************************************************************
aob-1f-mdf                 : ok=3    changed=0    unreachable=0    failed=1
```

ansible.log output around failure:

```
2018-01-05 16:51:58,444 p=12230 u=netadmin |  TASK [Gather running configs] ***************************************************************************************************************************************************************************************************************
2018-01-05 16:51:58,444 p=12230 u=netadmin |  task path: /home/netadmin/ansible-playbooks/aruba/backup-switch-aruba.yml:36
2018-01-05 16:51:58,445 p=12230 u=netadmin |   12230 1515189118.44509: sending task start callback
2018-01-05 16:51:58,445 p=12230 u=netadmin |   12230 1515189118.44547: entering _queue_task() for aob-1f-mdf/aruba_command
2018-01-05 16:51:58,446 p=12230 u=netadmin |   12230 1515189118.44583: Creating lock for aruba_command
2018-01-05 16:51:58,447 p=12230 u=netadmin |   12230 1515189118.44705: worker is 1 (out of 1 available)
2018-01-05 16:51:58,447 p=12230 u=netadmin |   12230 1515189118.44767: exiting _queue_task() for aob-1f-mdf/aruba_command
2018-01-05 16:51:58,448 p=12230 u=netadmin |   12230 1515189118.44837: done queuing things up, now waiting for results queue to drain
2018-01-05 16:51:58,449 p=12230 u=netadmin |   12230 1515189118.44881: waiting for pending results...
2018-01-05 16:51:58,454 p=12230 u=netadmin |   12285 1515189118.45409: running TaskExecutor() for aob-1f-mdf/TASK: Gather running configs
2018-01-05 16:51:58,456 p=12230 u=netadmin |   12285 1515189118.45602: in run() - task 080027f9-f3c3-9886-a06b-00000000002d
2018-01-05 16:51:58,457 p=12230 u=netadmin |   12285 1515189118.45713: calling self._execute()
2018-01-05 16:51:58,461 p=12230 u=netadmin |   12285 1515189118.46021: Loading FilterModule 'core' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/core.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:58,461 p=12230 u=netadmin |   12285 1515189118.46127: Loading FilterModule 'ipaddr' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/ipaddr.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:58,461 p=12230 u=netadmin |   12285 1515189118.46161: Loading FilterModule 'json_query' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/json_query.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:58,461 p=12230 u=netadmin |   12285 1515189118.46187: Loading FilterModule 'mathstuff' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/mathstuff.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:58,462 p=12230 u=netadmin |   12285 1515189118.46202: Loading FilterModule 'network' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/network.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:58,462 p=12230 u=netadmin |   12285 1515189118.46216: Loading FilterModule 'urlsplit' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/urlsplit.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:58,463 p=12230 u=netadmin |   12285 1515189118.46297: Loading TestModule 'core' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/test/core.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:58,463 p=12230 u=netadmin |   12285 1515189118.46333: Loading TestModule 'files' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/test/files.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:58,463 p=12230 u=netadmin |   12285 1515189118.46369: Loading TestModule 'mathstuff' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/test/mathstuff.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:58,465 p=12230 u=netadmin |   12285 1515189118.46573: Loading FilterModule 'core' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/core.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:58,466 p=12230 u=netadmin |   12285 1515189118.46603: Loading FilterModule 'ipaddr' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/ipaddr.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:58,466 p=12230 u=netadmin |   12285 1515189118.46643: Loading FilterModule 'json_query' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/json_query.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:58,467 p=12230 u=netadmin |   12285 1515189118.46677: Loading FilterModule 'mathstuff' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/mathstuff.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:58,467 p=12230 u=netadmin |   12285 1515189118.46725: Loading FilterModule 'network' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/network.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:58,469 p=12230 u=netadmin |   12285 1515189118.46800: Loading FilterModule 'urlsplit' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/filter/urlsplit.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:58,469 p=12230 u=netadmin |   12285 1515189118.46966: Loading TestModule 'core' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/test/core.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:58,470 p=12230 u=netadmin |   12285 1515189118.47005: Loading TestModule 'files' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/test/files.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:58,470 p=12230 u=netadmin |   12285 1515189118.47049: Loading TestModule 'mathstuff' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/test/mathstuff.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:58,475 p=12230 u=netadmin |   12285 1515189118.47500: Loading Connection 'local' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/connection/local.py
2018-01-05 16:51:58,476 p=12230 u=netadmin |   12285 1515189118.47622: Loading ShellModule 'csh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/csh.py
2018-01-05 16:51:58,477 p=12230 u=netadmin |   12285 1515189118.47716: Loading ShellModule 'fish' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/fish.py
2018-01-05 16:51:58,478 p=12230 u=netadmin |   12285 1515189118.47767: Loading ShellModule 'powershell' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/powershell.py
2018-01-05 16:51:58,478 p=12230 u=netadmin |   12285 1515189118.47822: Loading ShellModule 'sh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py
2018-01-05 16:51:58,479 p=12230 u=netadmin |   12285 1515189118.47896: Loading ShellModule 'sh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:58,482 p=12230 u=netadmin |   12285 1515189118.48183: assigned :doc
2018-01-05 16:51:58,484 p=12230 u=netadmin |   12285 1515189118.48333: Loading ActionModule 'aruba' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/action/aruba.py
2018-01-05 16:51:58,486 p=12230 u=netadmin |   12285 1515189118.48444: starting attempt loop
2018-01-05 16:51:58,486 p=12230 u=netadmin |   12285 1515189118.48632: running the handler
2018-01-05 16:51:58,488 p=12230 u=netadmin |   12285 1515189118.48832: Loading Connection 'persistent' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/connection/persistent.py
2018-01-05 16:51:58,489 p=12230 u=netadmin |   12285 1515189118.48925: Loading ShellModule 'csh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/csh.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:58,490 p=12230 u=netadmin |   12285 1515189118.49002: Loading ShellModule 'fish' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/fish.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:58,491 p=12230 u=netadmin |   12285 1515189118.49090: Loading ShellModule 'powershell' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/powershell.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:58,491 p=12230 u=netadmin |   12285 1515189118.49125: Loading ShellModule 'sh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:58,491 p=12230 u=netadmin |   12285 1515189118.49152: Loading ShellModule 'sh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:58,494 p=12230 u=netadmin |   12285 1515189118.49389: assigned :doc
2018-01-05 16:51:59,361 p=12286 u=netadmin |   12286 1515189119.36175: Loading Connection 'ssh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/connection/ssh.py (found_in_cache=False, class_only=True)
2018-01-05 16:51:59,395 p=12286 u=netadmin |   12286 1515189119.39547: assigned :doc
2018-01-05 16:51:59,396 p=12286 u=netadmin |   12286 1515189119.39592: Loaded config def from plugin (connection/ssh)
2018-01-05 16:51:59,402 p=12286 u=netadmin |   12295 1515189119.40214: Loading Connection 'network_cli' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/connection/network_cli.py
2018-01-05 16:51:59,404 p=12286 u=netadmin |   12295 1515189119.40437: Loading ShellModule 'csh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/csh.py
2018-01-05 16:51:59,404 p=12286 u=netadmin |   12295 1515189119.40487: Loading ShellModule 'fish' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/fish.py
2018-01-05 16:51:59,405 p=12286 u=netadmin |   12295 1515189119.40540: Loading ShellModule 'powershell' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/powershell.py
2018-01-05 16:51:59,405 p=12286 u=netadmin |   12295 1515189119.40551: Loading ShellModule 'sh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py
2018-01-05 16:51:59,405 p=12286 u=netadmin |   12295 1515189119.40583: Loading ShellModule 'sh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:59,406 p=12286 u=netadmin |   12295 1515189119.40622: Loading Connection 'local' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/connection/local.py
2018-01-05 16:51:59,406 p=12286 u=netadmin |   12295 1515189119.40642: Loading ShellModule 'csh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/csh.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:59,406 p=12286 u=netadmin |   12295 1515189119.40651: Loading ShellModule 'fish' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/fish.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:59,407 p=12286 u=netadmin |   12295 1515189119.40706: Loading ShellModule 'powershell' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/powershell.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:59,407 p=12286 u=netadmin |   12295 1515189119.40715: Loading ShellModule 'sh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:59,407 p=12286 u=netadmin |   12295 1515189119.40725: Loading ShellModule 'sh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:59,410 p=12286 u=netadmin |   12295 1515189119.41040: assigned :doc
2018-01-05 16:51:59,410 p=12286 u=netadmin |   12295 1515189119.41074: Loading Connection 'ssh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/connection/ssh.py (found_in_cache=True, class_only=True)
2018-01-05 16:51:59,422 p=12286 u=netadmin |   12295 1515189119.42296: assigned :doc
2018-01-05 16:51:59,423 p=12286 u=netadmin |   12295 1515189119.42378: Loaded config def from plugin (connection/ssh)
2018-01-05 16:51:59,429 p=12286 u=netadmin |   12295 1515189119.42927: assigned :doc
2018-01-05 16:51:59,429 p=12286 u=netadmin |   12295 1515189119.42943: Loaded config def from plugin (connection/network_cli)
2018-01-05 16:51:59,452 p=12286 u=netadmin |   12295 1515189119.45210: Loading Connection 'paramiko_ssh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/connection/paramiko_ssh.py
2018-01-05 16:51:59,452 p=12286 u=netadmin |   12295 1515189119.45272: Loading ShellModule 'csh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/csh.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:59,453 p=12286 u=netadmin |   12295 1515189119.45296: Loading ShellModule 'fish' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/fish.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:59,453 p=12286 u=netadmin |   12295 1515189119.45308: Loading ShellModule 'powershell' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/powershell.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:59,453 p=12286 u=netadmin |   12295 1515189119.45330: Loading ShellModule 'sh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:59,453 p=12286 u=netadmin |   12295 1515189119.45347: Loading ShellModule 'sh' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2018-01-05 16:51:59,460 p=12286 u=netadmin |   12295 1515189119.46018: assigned :doc
2018-01-05 16:51:59,460 p=12286 u=netadmin |   12295 1515189119.46065: Loaded config def from plugin (connection/paramiko_ssh)
2018-01-05 16:51:59,476 paramiko.transport starting thread (client mode): 0x66ba2210L
2018-01-05 16:51:59,477 paramiko.transport Local version/idstring: SSH-2.0-paramiko_2.4.0
2018-01-05 16:51:59,486 paramiko.transport Remote version/idstring: SSH-2.0-Mocana SSH 6.3
2018-01-05 16:51:59,487 paramiko.transport Connected (version 2.0, client Mocana)
2018-01-05 16:51:59,539 paramiko.transport kex algos:[u'diffie-hellman-group14-sha1'] server key:[u'ssh-rsa'] client encrypt:[u'aes256-ctr', u'aes256-cbc', u'rijndael-cbc@lysator.liu.se', u'aes192-ctr', u'aes192-cbc', u'aes128-ctr', u'aes128-cbc', u'3des-cbc'] server encrypt:[u'aes256-ctr', u'aes256-cbc', u'rijndael-cbc@lysator.liu.se', u'aes192-ctr', u'aes192-cbc', u'aes128-ctr', u'aes128-cbc', u'3des-cbc'] client mac:[u'hmac-sha1-96', u'hmac-md5', u'hmac-sha1', u'hmac-md5-96'] server mac:[u'hmac-sha1-96', u'hmac-md5', u'hmac-sha1', u'hmac-md5-96'] client compress:[u'none'] server compress:[u'none'] client lang:[u''] server lang:[u''] kex follows?False
2018-01-05 16:51:59,539 paramiko.transport Kex agreed: diffie-hellman-group14-sha1
2018-01-05 16:51:59,540 paramiko.transport HostKey agreed: ssh-rsa
2018-01-05 16:51:59,540 paramiko.transport Cipher agreed: aes128-ctr
2018-01-05 16:51:59,540 paramiko.transport MAC agreed: hmac-sha1
2018-01-05 16:51:59,540 paramiko.transport Compression agreed: none
2018-01-05 16:52:00,096 paramiko.transport kex engine KexGroup14 specified hash_algo <built-in function openssl_sha1>
2018-01-05 16:52:00,108 paramiko.transport Switch to new keys ...
2018-01-05 16:52:00,121 paramiko.transport userauth is OK
2018-01-05 16:52:00,136 paramiko.transport Auth banner: We'd like to keep you up to date about:
  * Software feature updates
  * New product announcements
  * Special events
Please register your products now at:  www.hpe.com/networking/register



2018-01-05 16:52:00,187 paramiko.transport Authentication (password) successful!
2018-01-05 16:52:00,211 paramiko.transport [chan 0] Max packet in: 32768 bytes
2018-01-05 16:52:00,244 paramiko.transport [chan 0] Max packet out: 32768 bytes
2018-01-05 16:52:00,244 paramiko.transport Secsh channel 0 opened.
2018-01-05 16:52:00,336 paramiko.transport [chan 0] Sesch channel 0 request ok
2018-01-05 16:52:00,438 paramiko.transport [chan 0] Sesch channel 0 request ok
2018-01-05 16:52:00,441 p=12286 u=netadmin |   12295 1515189120.44128: Loading TerminalModule 'aruba' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/terminal/aruba.py
2018-01-05 16:52:00,443 p=12286 u=netadmin |   12295 1515189120.44304: Loading Cliconf 'aruba' from /home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/cliconf/aruba.py
2018-01-05 16:52:31,026 p=12286 u=netadmin |  shutdown complete
2018-01-05 16:52:31,060 paramiko.transport EOF in transport thread
2018-01-05 16:52:31,061 p=12230 u=netadmin |  Traceback (most recent call last):
  File "/home/netadmin/.local/bin/ansible-connection", line 72, in start
    self.connection._connect()
  File "/home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/connection/network_cli.py", line 315, in _connect
    self.receive()
  File "/home/netadmin/.local/lib/python2.7/site-packages/ansible/plugins/connection/network_cli.py", line 385, in receive
    data = self._ssh_shell.recv(256)
  File "/home/netadmin/.local/lib/python2.7/site-packages/paramiko/channel.py", line 685, in recv
    raise socket.timeout()
timeout

2018-01-05 16:52:31,062 p=12230 u=netadmin |   12285 1515189151.06178: done running TaskExecutor() for aob-1f-mdf/TASK: Gather running configs [080027f9-f3c3-9886-a06b-00000000002d]
2018-01-05 16:52:31,062 p=12230 u=netadmin |   12285 1515189151.06251: sending task result for task 080027f9-f3c3-9886-a06b-00000000002d
2018-01-05 16:52:31,067 p=12230 u=netadmin |   12285 1515189151.06327: done sending task result for task 080027f9-f3c3-9886-a06b-00000000002d
2018-01-05 16:52:31,067 p=12230 u=netadmin |   12285 1515189151.06715: WORKER PROCESS EXITING
2018-01-05 16:52:31,070 p=12230 u=netadmin |   12230 1515189151.06906: marking aob-1f-mdf as failed
2018-01-05 16:52:31,070 p=12230 u=netadmin |   12230 1515189151.07049: marking host aob-1f-mdf failed, current state: HOST STATE: block=2, task=4, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
2018-01-05 16:52:31,071 p=12230 u=netadmin |   12230 1515189151.07101: ^ failed state is now: HOST STATE: block=2, task=4, rescue=0, always=0, run_state=ITERATING_COMPLETE, fail_state=FAILED_TASKS, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
2018-01-05 16:52:31,072 p=12230 u=netadmin |   12230 1515189151.07175: getting the next task for host aob-1f-mdf
2018-01-05 16:52:31,072 p=12230 u=netadmin |   12230 1515189151.07225: host aob-1f-mdf is done iterating, returning
2018-01-05 16:52:31,073 p=12230 u=netadmin |  fatal: [aob-1f-mdf]: FAILED! => {
    "msg": ""
}
2018-01-05 16:52:31,073 p=12230 u=netadmin |   12230 1515189151.07345: no more pending results, returning what we have
2018-01-05 16:52:31,074 p=12230 u=netadmin |   12230 1515189151.07401: results queue empty
2018-01-05 16:52:31,074 p=12230 u=netadmin |   12230 1515189151.07431: checking for any_errors_fatal
2018-01-05 16:52:31,079 p=12230 u=netadmin |   12230 1515189151.07478: done checking for any_errors_fatal
2018-01-05 16:52:31,080 p=12230 u=netadmin |   12230 1515189151.07963: checking for max_fail_percentage
2018-01-05 16:52:31,080 p=12230 u=netadmin |   12230 1515189151.08014: done checking for max_fail_percentage
2018-01-05 16:52:31,081 p=12230 u=netadmin |   12230 1515189151.08080: checking to see if all hosts have failed and the running result is not ok
2018-01-05 16:52:31,081 p=12230 u=netadmin |   12230 1515189151.08142: done checking to see if all hosts have failed
2018-01-05 16:52:31,082 p=12230 u=netadmin |   12230 1515189151.08189: getting the remaining hosts for this loop
2018-01-05 16:52:31,082 p=12230 u=netadmin |   12230 1515189151.08238: done getting the remaining hosts for this loop
2018-01-05 16:52:31,083 p=12230 u=netadmin |   12230 1515189151.08280: building list of next tasks for hosts
2018-01-05 16:52:31,083 p=12230 u=netadmin |   12230 1515189151.08327: getting the next task for host aob-1f-mdf
2018-01-05 16:52:31,087 p=12230 u=netadmin |   12230 1515189151.08410: host aob-1f-mdf is done iterating, returning
2018-01-05 16:52:31,088 p=12230 u=netadmin |   12230 1515189151.08768: done building task lists
2018-01-05 16:52:31,088 p=12230 u=netadmin |   12230 1515189151.08827: counting tasks in each state of execution
2018-01-05 16:52:31,090 p=12230 u=netadmin |   12230 1515189151.08897: done counting tasks in each state of execution:
        num_setups: 0
        num_tasks: 0
        num_rescue: 0
        num_always: 0
2018-01-05 16:52:31,091 p=12230 u=netadmin |   12230 1515189151.09119: all hosts are done, so returning None's for all hosts
2018-01-05 16:52:31,092 p=12230 u=netadmin |   12230 1515189151.09182: done queuing things up, now waiting for results queue to drain
2018-01-05 16:52:31,099 p=12230 u=netadmin |   12230 1515189151.09251: results queue empty
2018-01-05 16:52:31,101 p=12230 u=netadmin |   12230 1515189151.10003: checking for any_errors_fatal
2018-01-05 16:52:31,101 p=12230 u=netadmin |   12230 1515189151.10113: done checking for any_errors_fatal
2018-01-05 16:52:31,102 p=12230 u=netadmin |   12230 1515189151.10204: checking for max_fail_percentage
2018-01-05 16:52:31,103 p=12230 u=netadmin |   12230 1515189151.10294: done checking for max_fail_percentage
2018-01-05 16:52:31,104 p=12230 u=netadmin |   12230 1515189151.10372: checking to see if all hosts have failed and the running result is not ok
2018-01-05 16:52:31,104 p=12230 u=netadmin |   12230 1515189151.10427: done checking to see if all hosts have failed
2018-01-05 16:52:31,105 p=12230 u=netadmin |   12230 1515189151.10484: getting the next task for host aob-1f-mdf
2018-01-05 16:52:31,105 p=12230 u=netadmin |   12230 1515189151.10537: host aob-1f-mdf is done iterating, returning
2018-01-05 16:52:31,106 p=12230 u=netadmin |   12230 1515189151.10587: running handlers
2018-01-05 16:52:31,107 p=12230 u=netadmin |    to retry, use: --limit @/home/netadmin/ansible-playbooks/aruba/backup-switch-aruba.retry

2018-01-05 16:52:31,108 p=12230 u=netadmin |  PLAY RECAP **********************************************************************************************************************************************************************************************************************************
2018-01-05 16:52:31,108 p=12230 u=netadmin |  aob-1f-mdf                 : ok=3    changed=0    unreachable=0    failed=1
2018-01-05 16:52:31,109 p=12230 u=netadmin |   12230 1515189151.10912: RUNNING CLEANUP

```


PuTTY screen during login:


```
login as: netadmin
We'd like to keep you up to date about:
  * Software feature updates
  * New product announcements
  * Special events
Please register your products now at:  www.hpe.com/networking/register


Using keyboard-interactive authentication.
netadmin@10.100.99.2's password:

```

I noticed there are two lines displayed in PuTTY that aren't seen in the paramiko.transport Auth banner:  from the logs.  Not sure if it matters.


```
Using keyboard-interactive authentication.
netadmin@10.100.99.2's password:
```


PuTTY screen after login successful, must "Press any key to continue":


```
HP J9773A 2530-24G-PoEP Switch
Software revision YA.16.03.0003

 (C) Copyright 2016 Hewlett Packard Enterprise Development LP

                      RESTRICTED RIGHTS LEGEND
 Confidential computer software. Valid license from Hewlett Packard Enterprise
 Development LP required for possession, use or copying. Consistent with FAR
 12.211 and 12.212, Commercial Computer Software, Computer Software
 Documentation, and Technical Data for Commercial Items are licensed to the
 U.S. Government under vendor's standard commercial license.











Press any key to continue
Your previous successful login (as manager) was on 2018-01-05 16:51:59
 from 10.212.134.200





























1F-MDF-2530-24G-POE#
```

I revisited this issue today.  This time I applied the display debug that @jmighion recommended.  Now inside of the ansible.log file I'm seeing the complete banner and the prompt, yet still getting a socket timeout.

I ran a TCPDump during this.  Ansible server is the last device to speak before the timeout.

Also, I debugged SSH on the switch.  It appears to auth OK, but then gets ":Error receiving message, status = -5901".  I Googled "status = -5901", but didn't find much.

@walidshaari for sanity I too tried this connection with netmiko.  I used class of "hp_procurve" and it worked fine.

Is it possible that the Aruba module isn't working for HP ProCurve switches running the ArubaOS?  If so, then perhaps this really isn't an issue worth investigating anymore.

I would like to know what other people are using to get Ansible to connect to HP Procurve switches running HPE OS or Aruba OS.

ansible.log now showing full output and prompt:

```
2018-01-08 14:40:23,182 p=3994 u=netadmin |  TASK [Gather running configs] ***************************************************************************************************************************
2018-01-08 14:40:23,183 p=3994 u=netadmin |  task path: /home/netadmin/ansible-playbooks/aruba/backup-switch-aruba.yml:36
2018-01-08 14:40:23,183 p=3994 u=netadmin |    3994 1515440423.18309: sending task start callback
2018-01-08 14:40:23,183 p=3994 u=netadmin |    3994 1515440423.18343: entering _queue_task() for deathstar/aruba_command
2018-01-08 14:40:23,184 p=3994 u=netadmin |    3994 1515440423.18383: Creating lock for aruba_command
2018-01-08 14:40:23,185 p=3994 u=netadmin |    3994 1515440423.18502: worker is 1 (out of 1 available)
2018-01-08 14:40:23,186 p=3994 u=netadmin |    3994 1515440423.18579: exiting _queue_task() for deathstar/aruba_command
2018-01-08 14:40:23,186 p=3994 u=netadmin |    3994 1515440423.18635: done queuing things up, now waiting for results queue to drain
2018-01-08 14:40:23,187 p=3994 u=netadmin |    3994 1515440423.18679: waiting for pending results...
2018-01-08 14:40:23,192 p=3994 u=netadmin |    4049 1515440423.19100: running TaskExecutor() for deathstar/TASK: Gather running configs
2018-01-08 14:40:23,193 p=3994 u=netadmin |    4049 1515440423.19321: in run() - task 080027f9-f3c3-7056-3178-00000000002d
2018-01-08 14:40:23,194 p=3994 u=netadmin |    4049 1515440423.19427: calling self._execute()
2018-01-08 14:40:23,197 p=3994 u=netadmin |    4049 1515440423.19699: Loading FilterModule 'core' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/filter/core.py )
2018-01-08 14:40:23,197 p=3994 u=netadmin |    4049 1515440423.19750: Loading FilterModule 'ipaddr' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/filter/ipaddr)
2018-01-08 14:40:23,198 p=3994 u=netadmin |    4049 1515440423.19787: Loading FilterModule 'json_query' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/filter/js)
2018-01-08 14:40:23,199 p=3994 u=netadmin |    4049 1515440423.19886: Loading FilterModule 'mathstuff' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/filter/mat)
2018-01-08 14:40:23,199 p=3994 u=netadmin |    4049 1515440423.19920: Loading FilterModule 'network' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/filter/netwo)
2018-01-08 14:40:23,199 p=3994 u=netadmin |    4049 1515440423.19941: Loading FilterModule 'urlsplit' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/filter/urls)
2018-01-08 14:40:23,199 p=3994 u=netadmin |    4049 1515440423.19985: Loading TestModule 'core' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/test/core.py (fou)
2018-01-08 14:40:23,199 p=3994 u=netadmin |    4049 1515440423.19998: Loading TestModule 'files' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/test/files.py (f)
2018-01-08 14:40:23,200 p=3994 u=netadmin |    4049 1515440423.20002: Loading TestModule 'mathstuff' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/test/mathstu)
2018-01-08 14:40:23,203 p=3994 u=netadmin |    4049 1515440423.20242: Loading FilterModule 'core' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/filter/core.py )
2018-01-08 14:40:23,204 p=3994 u=netadmin |    4049 1515440423.20360: Loading FilterModule 'ipaddr' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/filter/ipaddr)
2018-01-08 14:40:23,204 p=3994 u=netadmin |    4049 1515440423.20415: Loading FilterModule 'json_query' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/filter/js)
2018-01-08 14:40:23,204 p=3994 u=netadmin |    4049 1515440423.20457: Loading FilterModule 'mathstuff' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/filter/mat)
2018-01-08 14:40:23,205 p=3994 u=netadmin |    4049 1515440423.20497: Loading FilterModule 'network' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/filter/netwo)
2018-01-08 14:40:23,206 p=3994 u=netadmin |    4049 1515440423.20552: Loading FilterModule 'urlsplit' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/filter/urls)
2018-01-08 14:40:23,207 p=3994 u=netadmin |    4049 1515440423.20674: Loading TestModule 'core' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/test/core.py (fou)
2018-01-08 14:40:23,207 p=3994 u=netadmin |    4049 1515440423.20755: Loading TestModule 'files' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/test/files.py (f)
2018-01-08 14:40:23,208 p=3994 u=netadmin |    4049 1515440423.20813: Loading TestModule 'mathstuff' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/test/mathstu)
2018-01-08 14:40:23,212 p=3994 u=netadmin |    4049 1515440423.21240: Loading Connection 'local' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/connection/localy
2018-01-08 14:40:23,213 p=3994 u=netadmin |    4049 1515440423.21344: Loading ShellModule 'csh' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/shell/csh.py
2018-01-08 14:40:23,214 p=3994 u=netadmin |    4049 1515440423.21425: Loading ShellModule 'fish' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/shell/fish.py
2018-01-08 14:40:23,215 p=3994 u=netadmin |    4049 1515440423.21475: Loading ShellModule 'powershell' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/shell/powey
2018-01-08 14:40:23,215 p=3994 u=netadmin |    4049 1515440423.21533: Loading ShellModule 'sh' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/shell/sh.py
2018-01-08 14:40:23,216 p=3994 u=netadmin |    4049 1515440423.21585: Loading ShellModule 'sh' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/shell/sh.py (found)
2018-01-08 14:40:23,219 p=3994 u=netadmin |    4049 1515440423.21925: assigned :doc
2018-01-08 14:40:23,222 p=3994 u=netadmin |    4049 1515440423.22139: Loading ActionModule 'aruba' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/action/aruba.py
2018-01-08 14:40:23,222 p=3994 u=netadmin |    4049 1515440423.22223: starting attempt loop
2018-01-08 14:40:23,223 p=3994 u=netadmin |    4049 1515440423.22290: running the handler
2018-01-08 14:40:23,224 p=3994 u=netadmin |    4049 1515440423.22436: Loading Connection 'persistent' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/connection/y
2018-01-08 14:40:23,225 p=3994 u=netadmin |    4049 1515440423.22523: Loading ShellModule 'csh' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/shell/csh.py (fou)
2018-01-08 14:40:23,226 p=3994 u=netadmin |    4049 1515440423.22572: Loading ShellModule 'fish' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/shell/fish.py (f)
2018-01-08 14:40:23,227 p=3994 u=netadmin |    4049 1515440423.22627: Loading ShellModule 'powershell' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/shell/powe)
2018-01-08 14:40:23,227 p=3994 u=netadmin |    4049 1515440423.22752: Loading ShellModule 'sh' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/shell/sh.py (found)
2018-01-08 14:40:23,228 p=3994 u=netadmin |    4049 1515440423.22805: Loading ShellModule 'sh' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/shell/sh.py (found)
2018-01-08 14:40:23,229 p=3994 u=netadmin |    4049 1515440423.22939: assigned :doc
2018-01-08 14:40:23,639 p=4050 u=netadmin |    4050 1515440423.63958: Loading Connection 'ssh' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/connection/ssh.py )
2018-01-08 14:40:23,665 p=4050 u=netadmin |    4050 1515440423.66586: assigned :doc
2018-01-08 14:40:23,666 p=4050 u=netadmin |    4050 1515440423.66653: Loaded config def from plugin (connection/ssh)
2018-01-08 14:40:23,670 p=4050 u=netadmin |    4059 1515440423.67054: Loading Connection 'network_cli' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/connectiony
2018-01-08 14:40:23,673 p=4050 u=netadmin |    4059 1515440423.67301: Loading ShellModule 'csh' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/shell/csh.py
2018-01-08 14:40:23,673 p=4050 u=netadmin |    4059 1515440423.67328: Loading ShellModule 'fish' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/shell/fish.py
2018-01-08 14:40:23,674 p=4050 u=netadmin |    4059 1515440423.67414: Loading ShellModule 'powershell' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/shell/powey
2018-01-08 14:40:23,674 p=4050 u=netadmin |    4059 1515440423.67425: Loading ShellModule 'sh' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/shell/sh.py
2018-01-08 14:40:23,674 p=4050 u=netadmin |    4059 1515440423.67457: Loading ShellModule 'sh' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/shell/sh.py (found)
2018-01-08 14:40:23,675 p=4050 u=netadmin |    4059 1515440423.67525: Loading Connection 'local' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/connection/localy
2018-01-08 14:40:23,675 p=4050 u=netadmin |    4059 1515440423.67587: Loading ShellModule 'csh' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/shell/csh.py (fou)
2018-01-08 14:40:23,676 p=4050 u=netadmin |    4059 1515440423.67600: Loading ShellModule 'fish' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/shell/fish.py (f)
2018-01-08 14:40:23,676 p=4050 u=netadmin |    4059 1515440423.67632: Loading ShellModule 'powershell' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/shell/powe)
2018-01-08 14:40:23,676 p=4050 u=netadmin |    4059 1515440423.67642: Loading ShellModule 'sh' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/shell/sh.py (found)
2018-01-08 14:40:23,676 p=4050 u=netadmin |    4059 1515440423.67652: Loading ShellModule 'sh' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/shell/sh.py (found)
2018-01-08 14:40:23,678 p=4050 u=netadmin |    4059 1515440423.67812: assigned :doc
2018-01-08 14:40:23,678 p=4050 u=netadmin |    4059 1515440423.67844: Loading Connection 'ssh' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/connection/ssh.py )
2018-01-08 14:40:23,689 p=4050 u=netadmin |    4059 1515440423.68904: assigned :doc
2018-01-08 14:40:23,690 p=4050 u=netadmin |    4059 1515440423.69003: Loaded config def from plugin (connection/ssh)
2018-01-08 14:40:23,694 p=4050 u=netadmin |    4059 1515440423.69449: assigned :doc
2018-01-08 14:40:23,694 p=4050 u=netadmin |    4059 1515440423.69486: Loaded config def from plugin (connection/network_cli)
2018-01-08 14:40:23,714 p=4050 u=netadmin |    4059 1515440423.71479: Loading Connection 'paramiko_ssh' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/connectioy
2018-01-08 14:40:23,715 p=4050 u=netadmin |    4059 1515440423.71508: Loading ShellModule 'csh' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/shell/csh.py (fou)
2018-01-08 14:40:23,715 p=4050 u=netadmin |    4059 1515440423.71516: Loading ShellModule 'fish' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/shell/fish.py (f)
2018-01-08 14:40:23,715 p=4050 u=netadmin |    4059 1515440423.71516: Loading ShellModule 'powershell' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/shell/powe)
2018-01-08 14:40:23,715 p=4050 u=netadmin |    4059 1515440423.71516: Loading ShellModule 'sh' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/shell/sh.py (found)
2018-01-08 14:40:23,715 p=4050 u=netadmin |    4059 1515440423.71519: Loading ShellModule 'sh' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/shell/sh.py (found)
2018-01-08 14:40:23,721 p=4050 u=netadmin |    4059 1515440423.72153: assigned :doc
2018-01-08 14:40:23,722 p=4050 u=netadmin |    4059 1515440423.72198: Loaded config def from plugin (connection/paramiko_ssh)
2018-01-08 14:40:23,725 paramiko.transport starting thread (client mode): 0x6076e250L
2018-01-08 14:40:23,725 paramiko.transport Local version/idstring: SSH-2.0-paramiko_2.4.0
2018-01-08 14:40:25,037 p=4050 u=netadmin |  window : ion/idstring: SSH-2.0-Mocana SSH 5.8
2018-01-08 14:40:23,726 paramiko.transport Connected (version 2.0, client Mocana)
2018-01-08 14:40:23,729 paramiko.transport kex algos:[u'diffie-hellman-group14-sha1'] server key:[u'ssh-rsa'] client encrypt:[u'aes256-ctr', u'aes256-cbc', u'rijndael-cbc@lysator.liu.se', u'aes192-e
2018-01-08 14:40:23,729 paramiko.transport Kex agreed: diffie-hellman-group14-sha1
2018-01-08 14:40:23,729 paramiko.transport HostKey agreed: ssh-rsa
2018-01-08 14:40:23,729 paramiko.transport Cipher agreed: aes128-ctr
2018-01-08 14:40:23,729 paramiko.transport MAC agreed: hmac-sha1
2018-01-08 14:40:23,729 paramiko.transport Compression agreed: none
2018-01-08 14:40:24,234 paramiko.transport kex engine KexGroup14 specified hash_algo <built-in function openssl_sha1>
2018-01-08 14:40:24,235 paramiko.transport Switch to new keys ...
2018-01-08 14:40:24,238 paramiko.transport userauth is OK
2018-01-08 14:40:24,240 paramiko.transport Auth banner: **This is a private system
 Unauthorized access may result in civil and criminal penalties**

2018-01-08 14:40:24,281 paramiko.transport Authentication (password) successful!
2018-01-08 14:40:24,301 paramiko.transport [chan 0] Max packet in: 32768 bytes
2018-01-08 14:40:24,348 paramiko.transport [chan 0] Max packet out: 32768 bytes
2018-01-08 14:40:24,348 paramiko.transport Secsh channel 0 opened.
2018-01-08 14:40:24,449 paramiko.transport [chan 0] Sesch channel 0 request ok
2018-01-08 14:40:24,550 paramiko.transport [chan 0] Sesch channel 0 request ok
2018-01-08 14:40:24,554 p=4050 u=netadmin |    4059 1515440424.55437: Loading TerminalModule 'aruba' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/terminal/aruy
2018-01-08 14:40:24,557 p=4050 u=netadmin |    4059 1515440424.55740: Loading Cliconf 'aruba' from /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/cliconf/aruba.py
2018-01-08 14:40:24,922 p=4050 u=netadmin |  window :
**Your previous successful login (as manager) was on 2018-01-08 19:35:55
 from 10.1.2.99





















NSO-DeathStar8212#**
2018-01-08 14:40:55,041 p=4050 u=netadmin |  shutdown complete
2018-01-08 14:40:55,076 p=3994 u=netadmin |  Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/EGG-INFO/scripts/ansible-connection", line 72, in start
    self.connection._connect()
  File "/usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/connection/network_cli.py", line 315, in _connect
    self.receive()
  File "/usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible/plugins/connection/network_cli.py", line 385, in receive
    data = self._ssh_shell.recv(256)
  File "/home/netadmin/.local/lib/python2.7/site-packages/paramiko/channel.py", line 685, in recv
    raise socket.timeout()
timeout

2018-01-08 14:40:55,077 p=3994 u=netadmin |    4049 1515440455.07711: done running TaskExecutor() for deathstar/TASK: Gather running configs [080027f9-f3c3-7056-3178-00000000002d]
2018-01-08 14:40:55,078 p=3994 u=netadmin |    4049 1515440455.07769: sending task result for task 080027f9-f3c3-7056-3178-00000000002d
2018-01-08 14:40:55,079 p=3994 u=netadmin |    4049 1515440455.07936: done sending task result for task 080027f9-f3c3-7056-3178-00000000002d
2018-01-08 14:40:55,079 p=3994 u=netadmin |    4049 1515440455.07978: WORKER PROCESS EXITING
2018-01-08 14:40:55,082 paramiko.transport EOF in transport thread
2018-01-08 14:40:55,083 p=3994 u=netadmin |    3994 1515440455.08167: marking deathstar as failed
2018-01-08 14:40:55,084 p=3994 u=netadmin |    3994 1515440455.08365: marking host deathstar failed, current state: HOST STATE: block=2, task=4, rescue=0, always=0, run_state=ITERATING_TASKS, fail_e
2018-01-08 14:40:55,084 p=3994 u=netadmin |    3994 1515440455.08424: ^ failed state is now: HOST STATE: block=2, task=4, rescue=0, always=0, run_state=ITERATING_COMPLETE, fail_state=FAILED_TASKS, e
2018-01-08 14:40:55,085 p=3994 u=netadmin |    3994 1515440455.08478: getting the next task for host deathstar
2018-01-08 14:40:55,085 p=3994 u=netadmin |    3994 1515440455.08524: host deathstar is done iterating, returning
2018-01-08 14:40:55,086 p=3994 u=netadmin |  fatal: [deathstar]: FAILED! => {
    "msg": ""
}
2018-01-08 14:40:55,087 p=3994 u=netadmin |    3994 1515440455.08668: no more pending results, returning what we have
2018-01-08 14:40:55,087 p=3994 u=netadmin |    3994 1515440455.08714: results queue empty
2018-01-08 14:40:55,088 p=3994 u=netadmin |    3994 1515440455.08785: checking for any_errors_fatal
2018-01-08 14:40:55,088 p=3994 u=netadmin |    3994 1515440455.08861: done checking for any_errors_fatal
2018-01-08 14:40:55,089 p=3994 u=netadmin |    3994 1515440455.08901: checking for max_fail_percentage
2018-01-08 14:40:55,089 p=3994 u=netadmin |    3994 1515440455.08947: done checking for max_fail_percentage
2018-01-08 14:40:55,090 p=3994 u=netadmin |    3994 1515440455.08990: checking to see if all hosts have failed and the running result is not ok
2018-01-08 14:40:55,090 p=3994 u=netadmin |    3994 1515440455.09033: done checking to see if all hosts have failed
2018-01-08 14:40:55,091 p=3994 u=netadmin |    3994 1515440455.09093: getting the remaining hosts for this loop
2018-01-08 14:40:55,091 p=3994 u=netadmin |    3994 1515440455.09146: done getting the remaining hosts for this loop
2018-01-08 14:40:55,091 p=3994 u=netadmin |    3994 1515440455.09182: building list of next tasks for hosts
2018-01-08 14:40:55,092 p=3994 u=netadmin |    3994 1515440455.09204: getting the next task for host deathstar
2018-01-08 14:40:55,092 p=3994 u=netadmin |    3994 1515440455.09218: host deathstar is done iterating, returning
2018-01-08 14:40:55,092 p=3994 u=netadmin |    3994 1515440455.09229: done building task lists
2018-01-08 14:40:55,092 p=3994 u=netadmin |    3994 1515440455.09240: counting tasks in each state of execution
2018-01-08 14:40:55,092 p=3994 u=netadmin |    3994 1515440455.09263: done counting tasks in each state of execution:
        num_setups: 0
        num_tasks: 0
        num_rescue: 0
        num_always: 0
2018-01-08 14:40:55,093 p=3994 u=netadmin |    3994 1515440455.09302: all hosts are done, so returning None's for all hosts
2018-01-08 14:40:55,093 p=3994 u=netadmin |    3994 1515440455.09315: done queuing things up, now waiting for results queue to drain
2018-01-08 14:40:55,093 p=3994 u=netadmin |    3994 1515440455.09327: results queue empty
2018-01-08 14:40:55,093 p=3994 u=netadmin |    3994 1515440455.09337: checking for any_errors_fatal
2018-01-08 14:40:55,093 p=3994 u=netadmin |    3994 1515440455.09354: done checking for any_errors_fatal
2018-01-08 14:40:55,093 p=3994 u=netadmin |    3994 1515440455.09365: checking for max_fail_percentage
2018-01-08 14:40:55,093 p=3994 u=netadmin |    3994 1515440455.09375: done checking for max_fail_percentage
2018-01-08 14:40:55,093 p=3994 u=netadmin |    3994 1515440455.09385: checking to see if all hosts have failed and the running result is not ok
2018-01-08 14:40:55,094 p=3994 u=netadmin |    3994 1515440455.09411: done checking to see if all hosts have failed
2018-01-08 14:40:55,095 p=3994 u=netadmin |    3994 1515440455.09462: getting the next task for host deathstar
2018-01-08 14:40:55,095 p=3994 u=netadmin |    3994 1515440455.09518: host deathstar is done iterating, returning
2018-01-08 14:40:55,095 p=3994 u=netadmin |    3994 1515440455.09555: running handlers
2018-01-08 14:40:55,096 p=3994 u=netadmin |     to retry, use: --limit @/home/netadmin/ansible-playbooks/aruba/backup-switch-aruba.retry

2018-01-08 14:40:55,097 p=3994 u=netadmin |  PLAY RECAP **********************************************************************************************************************************************
2018-01-08 14:40:55,097 p=3994 u=netadmin |  deathstar                  : ok=3    changed=0    unreachable=0    failed=1
2018-01-08 14:40:55,098 p=3994 u=netadmin |    3994 1515440455.09812: RUNNING CLEANUP

```


Switch debug during login:

```
0404:22:46:42.15 SSH  tSsh1:User aaron successfully logged in from 10.1.2.99
I 01/08/18 19:40:24 03362 auth: AM1: User 'aaron' logged in from 10.1.2.99 to
            SSH  session
I 01/08/18 19:40:24 00179 mgr: AM1: SME SSH from 10.1.2.99 - MANAGER Mode
0404:22:47:12.98 SSH  tSsh1:Error receiving message, status = -5901
I 01/08/18 19:40:55 03363 auth: AM1: User 'aaron' logged out of SSH  session
            from  10.1.2.99
0404:22:47:13.38 SSH  tSsh1:User aaron logged out from 10.1.2.99
```
 @thepackbot I am away traveling at the moment, and the problem with these network devices is that you have to work on a physical one, there is not a VM I can use to simulate this issue and work on it. 
check http://community.arubanetworks.com/t5/Network-Management/SSH-connection-problem-with-an-HP-switch-in-ArubaOS/td-p/294004

For a description of why this might fail.

And why is noone using the new REST API available in Aruba switches?
@axlroden The HP/Aruba REST API works nicely with Ansible's REST modules... However the API call to retrieve the running configuration (../rest/v3/switch-config) 404's. I have a ticket with HP fix this. :)

Otherwise, this is a "Me Too" post. I experience this same problem on a HP/Aruba 2530-8g. If there is anything I can test, please let me know. I am happy to help test.
Sorry, I dont have a HP ProCurve to test against and the version of Aruba I can test against is unable to replicate the issue. I'm wondering if the "Press any key to continue" part is the cause of the hang. Looking at the netmiko driver for HP ProCurve, they handle it by sending an extra carriage return. It might be worth a shot for someone to try that, but I'm not sure where that should/could live in the ansible connection setup (network_cli.py).

https://github.com/ktbyers/netmiko/blob/develop/netmiko/hp/hp_procurve_ssh.py#L12
Hi @fredtesche ,

Can you point me to proper Ansible's REST modules that will work with HP/Aruba REST AP?

Thanks
Sergiu
@sppwf I tested all the GETs from here: https://support.hpe.com/hpsc/doc/public/display?docId=emr_na-a00021940en_us&docLocale=en_US and all but a few worked as expected.

There is one module called "switch_config" that is supposed to return the running config, but it 404's. I opened a ticket with HP and they told me that that particular module is only for HP's internal testing/development, and will not be made available.

Here's a thread elsewhere I created about this: https://www.reddit.com/r/networking/comments/82b66h/rest_api_on_hp_aruba_2530/
Hi, I am seeing the same issue on Aruba 225 IAP (Version 6.5.3.30)

ansible 2.4.3.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/user/ycaty/.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.5 (default, Nov  6 2016, 00:28:07) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]

pip freeze | grep gssapi
gssapi==1.2.0
pip freeze | grep paramiko
paramiko==2.4.1
python --version
Python 2.7.5
*******************************************************
Error is:
e<1x.xx.xx.x1> socket_path: None
fatal: [Aruba-IAP]: FAILED! => {
    "changed": false,
    "failed": true,
    "msg": "unable to open shell. Please see: https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell"
}
Please see: https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell"}

Log file output:
Getting below error : 

2018-03-15 10:45:13,488 p=7276 u=root |  1 plays in Aruba_GetConfig_All.yml
2018-03-15 10:45:13,520 p=7276 u=root |  PLAY [ArubaAll] *****************************************************************************************************************************************************************************************************************************
2018-03-15 10:45:13,544 p=7276 u=root |  TASK [Gathering Facts] **********************************************************************************************************************************************************************************************************************
2018-03-15 10:45:13,816 p=7276 u=root |  Using module file /usr/lib/python2.7/site-packages/ansible/modules/system/setup.py
2018-03-15 10:45:13,817 p=7276 u=root |  Using module file /usr/lib/python2.7/site-packages/ansible/modules/system/setup.py
2018-03-15 10:45:13,817 p=7276 u=root |  Using module file /usr/lib/python2.7/site-packages/ansible/modules/system/setup.py
2018-03-15 10:45:13,818 p=7276 u=root |  Using module file /usr/lib/python2.7/site-packages/ansible/modules/system/setup.py
2018-03-15 10:45:14,165 p=7276 u=root |  ok: [STG-IAP]
2018-03-15 10:45:14,193 p=7276 u=root |  META: ran handlers
2018-03-15 10:45:14,199 p=7276 u=root |  TASK [RETRIEVE CONFIGURATION FILE] **********************************************************************************************************************************************************************************************************
2018-03-15 10:45:14,199 p=7276 u=root |  task path: /home/ycaty/Aruba_GetConfig_All.yml:14
2018-03-15 10:45:14,971 p=7502 u=root |  creating new control socket for host 1x.xx.xx.x:2x as user admin
2018-03-15 10:45:14,972 p=7502 u=root |  control socket path is /root/.ansible/pc/0726dffd4d
2018-03-15 10:45:14,996 p=7504 u=root |  using connection plugin network_cli
2018-03-15 10:45:15,017 p=7502 u=root |  failed to create control socket for host 1x.xx.xx.x
2018-03-15 10:45:15,019 p=7502 u=root |  Traceback (most recent call last):
  File "/bin/ansible-connection", line 315, in main
    server = Server(socket_path, pc)
  File "/bin/ansible-connection", line 111, in __init__
    self.connection = connection_loader.get(play_context.connection, play_context, sys.stdin)
  File "/usr/lib/python2.7/site-packages/ansible/plugins/loader.py", line 363, in get
    self._module_cache[path] = self._load_module_source(name, path)
  File "/usr/lib/python2.7/site-packages/ansible/plugins/loader.py", line 339, in _load_module_source
    module = imp.load_source(full_name, path, module_file)
  File "/usr/lib/python2.7/site-packages/ansible/plugins/connection/network_cli.py", line 61, in <module>
    from ansible.plugins.connection.paramiko_ssh import Connection as _Connection
  File "/usr/lib/python2.7/site-packages/ansible/plugins/connection/paramiko_ssh.py", line 94, in <module>
    import paramiko
  File "/usr/lib/python2.7/site-packages/paramiko/__init__.py", line 22, in <module>
    from paramiko.transport import SecurityOptions, Transport
  File "/usr/lib/python2.7/site-packages/paramiko/transport.py", line 38, in <module>
    from paramiko.auth_handler import AuthHandler
  File "/usr/lib/python2.7/site-packages/paramiko/auth_handler.py", line 48, in <module>
    from paramiko.ssh_gss import GSSAuth, GSS_EXCEPTIONS
  File "/usr/lib/python2.7/site-packages/paramiko/ssh_gss.py", line 54, in <module>
    GSS_EXCEPTIONS = (gssapi.GSSException,)
AttributeError: 'module' object has no attribute 'GSSException'


Can someone suggest a solution?
. 
Same here on procurve 5412, aruba 2920, 2948.
netminko connecting flawlessly.
The press any key freeze ansible connection waiting for an any key to be enter and timeout.





Retried this by removing the gssapi, still see the issue.

ansible-version: 2.4.0.0

error : 
<1x.xx.xx.x1> socket_path: None
fatal: [Aruba-IAP]: FAILED! => {
    "changed": false,
    "failed": true,
    "msg": "unable to open shell. Please see: https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell"
}
    

log output:

2018-03-20 08:30:02,390 p=14821 u=root |  TASK [RETRIEVE CONFIGURATION FILE] *************************************************************************************************************************************
2018-03-20 08:30:02,390 p=14821 u=root |  task path: /home/ycaty/Aruba_GetConfig_All.yml:14
2018-03-20 08:30:03,130 p=14893 u=root |  creating new control socket for host 100.64.10.3:22 as user admin
2018-03-20 08:30:03,131 p=14893 u=root |  control socket path is /root/.ansible/pc/c6b98ef61d
2018-03-20 08:30:03,132 p=14893 u=root |  current working directory is /home/ycaty/
2018-03-20 08:30:03,132 p=14893 u=root |  using connection plugin network_cli
2018-03-20 08:30:03,168 paramiko.transport starting thread (client mode): 0x38abe50L
2018-03-20 08:30:03,168 paramiko.transport Local version/idstring: SSH-2.0-paramiko_2.4.1
2018-03-20 08:30:03,185 paramiko.transport Remote version/idstring: SSH-2.0-OpenSSH_7.1
2018-03-20 08:30:03,185 paramiko.transport Connected (version 2.0, client OpenSSH_7.1)
2018-03-20 08:30:03,186 paramiko.transport kex algos:[u'ecdh-sha2-nistp256', u'ecdh-sha2-nistp384', u'ecdh-sha2-nistp521', u'diffie-hellman-group-exchange-sha256', u'diffie-hellman-group14-sha1'] server key:[u'ssh-rsa'] client encrypt:[u'aes128-ctr', u'aes192-ctr', u'aes256-ctr', u'aes128-cbc', u'aes192-cbc', u'aes256-cbc', u'3des-cbc'] server encrypt:[u'aes128-ctr', u'aes192-ctr', u'aes256-ctr', u'aes128-cbc', u'aes192-cbc', u'aes256-cbc', u'3des-cbc'] client mac:[u'hmac-sha2-256-etm@openssh.com', u'hmac-sha2-512-etm@openssh.com', u'hmac-sha1-etm@openssh.com', u'hmac-sha2-256', u'hmac-sha2-512', u'hmac-sha1'] server mac:[u'hmac-sha2-256-etm@openssh.com', u'hmac-sha2-512-etm@openssh.com', u'hmac-sha1-etm@openssh.com', u'hmac-sha2-256', u'hmac-sha2-512', u'hmac-sha1'] client compress:[u'none', u'zlib@openssh.com'] server compress:[u'none', u'zlib@openssh.com'] client lang:[u''] server lang:[u''] kex follows?False
2018-03-20 08:30:03,186 paramiko.transport Kex agreed: ecdh-sha2-nistp256
2018-03-20 08:30:03,186 paramiko.transport HostKey agreed: ssh-rsa
2018-03-20 08:30:03,186 paramiko.transport Cipher agreed: aes128-ctr
2018-03-20 08:30:03,186 paramiko.transport MAC agreed: hmac-sha2-256
2018-03-20 08:30:03,186 paramiko.transport Compression agreed: none
2018-03-20 08:30:03,508 paramiko.transport kex engine KexNistp256 specified hash_algo <built-in function openssl_sha256>
2018-03-20 08:30:03,508 paramiko.transport Switch to new keys ...
2018-03-20 08:30:03,534 paramiko.transport userauth is OK
2018-03-20 08:30:04,099 paramiko.transport Authentication (password) successful!
2018-03-20 08:30:04,133 p=14893 u=root |  ssh connection done, setting terminal
2018-03-20 08:30:04,133 paramiko.transport [chan 0] Max packet in: 32768 bytes
2018-03-20 08:30:04,134 paramiko.transport Received global request "hostkeys-00@openssh.com"
2018-03-20 08:30:04,134 paramiko.transport Rejecting "hostkeys-00@openssh.com" global request from server.
2018-03-20 08:30:04,175 paramiko.transport [chan 0] Max packet out: 32768 bytes
2018-03-20 08:30:04,175 paramiko.transport Secsh channel 0 opened.
2018-03-20 08:30:04,199 paramiko.transport [chan 0] Sesch channel 0 request ok
2018-03-20 08:30:04,201 paramiko.transport [chan 0] Sesch channel 0 request ok
2018-03-20 08:30:04,203 p=14893 u=root |  loaded terminal plugin for network_os aruba
2018-03-20 08:30:04,205 p=14893 u=root |  loaded cliconf plugin for network_os aruba
2018-03-20 08:30:13,436 p=14821 u=root |  fatal: [STG-OF1-IAP]: FAILED! => {
    "changed": false,
    "failed": true,
    "msg": "unable to open shell. Please see: https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell"

************************************************************************
persistent connections in ansible.cfg:
[presistent_connection]
ANSIBLE_PERSISTENT_CONNECT_TIMEOUT=100
ANSIBLE_PERSISTENT_CONNECT_RETRY_TIMEOUT=60
ANSIBLE_PERSISTENT_COMMAND_TIMEOUT=100
***********************************************************************
Note: 
The device is a Aruba IAP- ArubaOS (MODEL: 225), Version 6.5.3.3
I am able to login to it using the credentials:
login as: admin
admin@1x.x.x.1's password:

show tech-support and show tech-support supplemental are the two most useful outputs to collect for any kind of troubleshooting session.

Aruba-AP1#

Any suggestions, please!
By enabling debug with `display.display("window : %s" % data)` @ line 395 it would appear to be the press any key which is breaking the process

```
 13434 2018-04-22 17:43:52,768 p=2851 u=novus |  window : HP J9147A 2910al-48G Switch^M^M
 13435 Software revision W.15.14.0015^M^M
 13436 ^M^M
 13437 Copyright (C) 1991-2017 Hewlett-Packard Development Company, L.P.^M
 13438 ^M
 13439                    RESTRICTED RIGHTS LEGEND^M
 13440  Confidential computer software.  Valid license from HP required for possess
 13441 2018-04-22 17:43:52,769 p=2851 u=novus |  window : ion,^M
 13442  use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer^M
 13443  Software, Computer Software Documentation, and Technical Data for Commercial^M
 13444  Items are licensed to the U.S. Government under vendor's standard commercial^M
 13445  license.^M
 13446 
 13447 2018-04-22 17:43:52,771 p=2851 u=novus |  window :                HEWLETT-PACKARD DEVELOPMENT COMPANY, L.P. ^M
 13448                    20555 State Highway 249, Houston, TX 77070^M
 13449 ^M
 13450 ^[[1;15r^[[1;1H
 13451 2018-04-22 17:43:52,887 p=2851 u=novus |  window : ^[[24;1HPress any key to continue^[[15;1H^[[?25h^[[24;27H
```

Could really do with getting this to work as the Aruba API is only on the newer gen of switches.
I suspect it is more than just the press any key now

```
316        if network_os == 'aruba':
317             display.vvvv('Pressing any key')
318             self._ssh_shell.sendall(b'\r')
319             time.sleep(3)
```

Even with jmighion updated aruba.py it's struggling to find the prompt despite the regex being correct.


```
 19190 2018-04-22 19:13:03,983 p=3266 u=novus |  Pressing any key
 19191 2018-04-22 19:13:06,984 p=3266 u=novus |  window : HP J9147A 2910al-48G Switch^M^M
 19192 Software revision W.15.14.0015^M^M
 19193 ^M^M
 19194 Copyright (C) 1991-2017 Hewlett-Packard Development Company, L.P.^M
 19195 ^M
 19196                    RESTRICTED RIGHTS LEGEND^M
 19197  Confidential computer software.  Valid license from HP required for possess
 19198 2018-04-22 19:13:06,985 p=3266 u=novus |  window : ion,^M
 19199  use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer^M
 19200  Software, Computer Software Documentation, and Technical Data for Commercial^M
 19201  Items are licensed to the U.S. Government under vendor's standard commercial^M
 19202  license.^M
 19203 
 19204 2018-04-22 19:13:06,985 p=3266 u=novus |  window :                HEWLETT-PACKARD DEVELOPMENT COMPANY, L.P. ^M
 19205                    20555 State Highway 249, Houston, TX 77070^M
 19206 ^M
 19207 ^[[1;15r^[[1;1H^[[24;1HPress any key to continue^[[15;1H^[[?25h^[[24;27H^[[?6l^[[1;24r^[[?7l^[[2J^[[1;1H^[[1920;1920H^[[6n^[[1;1HYour previous suc
 19208 2018-04-22 19:13:06,986 p=3266 u=novus |  window : cessful login (as manager) was on 1990-01-01 04:39:48     ^M
 19209  from 172.29.1.101^M
 19210 ^[[1;24r^[[24;1H^[[24;1H^[[2K^[[24;1H^[[?25h^[[24;1H^[[24;1HHP# ^[[24;1H^[[24;5H^[[24;1H^[[?25h^[[24;5H
```
@AndyFriar 
Can you please try with below one line change in network_cli.py and check. 
```
--- a/lib/ansible/plugins/connection/network_cli.py
+++ b/lib/ansible/plugins/connection/network_cli.py
@@ -312,7 +312,7 @@ class Connection(ConnectionBase):
         else:
             display.vvvv('unable to load cliconf for network_os %s' % network_os)

-        self.receive()
+        self.receive(prompts='Press any key to continue', answer='\r')

         display.vvvv('firing event: on_open_shell()', host=self._play_context.remote_addr)
         self._terminal.on_open_shell()
```
Certainly sends the key press and therefore a much better abbreviation of my bodged code.

Just need to work out why it's not detecting the prompt now
@AndyFriar I have created a branch with more logs added to debug the issue here
You can get it in your environment by running below commands.

```
$ git clone -b initial_login_prompt  https://github.com/ganeshrn/ansible.git
$ cd ansible
$ source hacking/env-setup
$ which ansible
```
The output of the last command should point to `<present-working-directory-path>/bin/ansible`
After that rerun the test case. 

The extra debug logs will be available in log file which is set in the active `ansible.cfg` file. eg:
```
[defaults]
log_path = /tmp/ansible-test.out
```

If possible please share the debug logs using gist (https://gist.github.com/) after redacting enviornment information from the debug logs. 
Probably something wrong on my end as it fails to run once i've cloned to /opt/ansible

```
[novus@ansi ansible]$ ansible-playbook -i inventories/corpvirty/ playbooks/zzProcurve.yml -vvvv
  3552 1524426744.45409: starting run
Traceback (most recent call last):
  File "/opt/ansible/bin/ansible-playbook", line 97, in <module>
    mycli = getattr(__import__("ansible.cli.%s" % sub, fromlist=[myclass]), myclass)
  File "/opt/ansible/lib/ansible/cli/__init__.py", line 38, in <module>
    from ansible.inventory.manager import InventoryManager
  File "/opt/ansible/lib/ansible/inventory/manager.py", line 33, in <module>
    from ansible.plugins.loader import inventory_loader
  File "/opt/ansible/lib/ansible/plugins/loader.py", line 22, in <module>
    from ansible.parsing.utils.yaml import from_yaml
  File "/opt/ansible/lib/ansible/parsing/utils/yaml.py", line 18, in <module>
    from ansible.parsing.yaml.loader import AnsibleLoader
  File "/opt/ansible/lib/ansible/parsing/yaml/loader.py", line 30, in <module>
    from ansible.parsing.yaml.constructor import AnsibleConstructor
  File "/opt/ansible/lib/ansible/parsing/yaml/constructor.py", line 29, in <module>
    from ansible.parsing.vault import VaultLib
  File "/opt/ansible/lib/ansible/parsing/vault/__init__.py", line 45, in <module>
    from cryptography.hazmat.backends import default_backend
  File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/__init__.py", line 7, in <module>
    import pkg_resources
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 3007, in <module>
    working_set.require(__requires__)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 728, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 626, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: ansible
[novus@ansi ansible]$ 
```

@AndyFriar Not sure what the issue is.
Instead, try applying the changes here https://github.com/ganeshrn/ansible/commit/175452c5f08163178c0e1e8b5ea89d431c76d2d4

in your running environment. Hopefully it should work
Many thanks for taking the time.

https://gist.github.com/AndyFriar/2e9277d491d6d1ed3ae81fc7a95243db

This was using your fork.

I'm thinking the regex is not taking into account the VT100 escape codes maybe?
https://github.com/ktbyers/netmiko/blob/develop/netmiko/hp/hp_procurve_ssh.py#L32


Given the above if i change the following in the switch

`console terminal none`
 
Initial test of changing the hostname is working correctly

It does make it near impossible to manage via CLI mind.
@AndyFriar Thank you for sharing the logs. Based on the response prompt in the logs I have written a sample python script to sanitize the response and fetch the prompt.
https://gist.github.com/ganeshrn/f7401ee0d5f517c2b0653c57713e6ab7


 Also, I have updated the aruba terminal plugin to strip control sequence in returned response and updated terminal regex to match the prompt in the same branch ie. https://github.com/ganeshrn/ansible/tree/initial_login_prompt

Can you please update the branch in your enviornment and rerun the testcase. Hopefully it should match the returned prompt.


Thanks @ganeshrn 

Getting further only it would appear no commands function

https://gist.github.com/AndyFriar/cb23d4bd15fd70cbc553d5124a5c38bb

i'll try a couple of other commands

Resolving patch:
diff --git a/lib/ansible/plugins/connection/network_cli.py b/lib/ansible/plugins/connection/network_cli.py
--- a/lib/ansible/plugins/connection/network_cli.py
+++ b/lib/ansible/plugins/connection/network_cli.py
@@ -312,7 +312,8 @@ def _connect(self):
         else:
             display.vvvv('unable to load cliconf for network_os %s' % network_os)
 
-        self.receive()
+        self.receive(prompts=self._terminal.terminal_initial_prompt, answer=self._terminal.terminal_initial_answer,
+                     newline=self._terminal.terminal_inital_prompt_newline)
 
         display.vvvv('firing event: on_open_shell()', host=self._play_context.remote_addr)
         self._terminal.on_open_shell()
diff --git a/lib/ansible/plugins/terminal/__init__.py b/lib/ansible/plugins/terminal/__init__.py
--- a/lib/ansible/plugins/terminal/__init__.py
+++ b/lib/ansible/plugins/terminal/__init__.py
@@ -52,6 +52,15 @@ class TerminalBase(with_metaclass(ABCMeta, object)):
         re.compile(br'\x08.')
     ]
 
+    #: terminal initial prompt
+    terminal_initial_prompt = None
+
+    #: terminal initial answer
+    terminal_initial_answer = None
+
+    #: Send newline after prompt match
+    terminal_inital_prompt_newline = True
+
     def __init__(self, connection):
         self._connection = connection
 
diff --git a/lib/ansible/plugins/terminal/aruba.py b/lib/ansible/plugins/terminal/aruba.py
--- a/lib/ansible/plugins/terminal/aruba.py
+++ b/lib/ansible/plugins/terminal/aruba.py
@@ -29,10 +29,18 @@
 
 class TerminalModule(TerminalBase):
 
+    ansi_re = [
+        # check ECMA-48 Section 5.4 (Control Sequences)
+        re.compile(br'(\x1b\[\?1h\x1b=)'),
+        re.compile(br'((?:\x9b|\x1b\x5b)[\x30-\x3f]*[\x20-\x2f]*[\x40-\x7e])'),
+        re.compile(br'\x08.')
+    ]
+
     terminal_stdout_re = [
         re.compile(br"[\r\n]?[\w]*\(.+\) ?#(?:\s*)$"),
         re.compile(br"[pP]assword:$"),
         re.compile(br"(?<=\s)[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?\s*#\s*$"),
+        re.compile(br"[\r\n]?[\w\+\-\.:\/\[\]]+(?:\([^\)]+\)){0,3}(?:[>#]) ?$"),
     ]
 
     terminal_stderr_re = [
@@ -47,6 +55,12 @@ class TerminalModule(TerminalBase):
         re.compile(br"'[^']' +returned error code: ?\d+"),
     ]
 
+    terminal_initial_prompt = b'Press any key to continue'
+
+    terminal_initial_answer = b'\r'
+
+    terminal_inital_prompt_newline = False
+
     def on_open_shell(self):
         try:
             self._exec_cli_command(b'no pag')


Test patch: