Hello,

I am trying to use the aruba_command:


Here's my playbook:

---
- hosts: all
  connection: local
  tasks:
  - name: run show version on remote devices
    aruba_command:
      commands: show version
      provider:
        username: admin
        password: admin
        host: 192.168.3.5


Here's the output:

ansible-playbook -i all, aruba.yml -vvv
ansible-playbook 2.7.8
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/sudheer/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']   ansible python module location = /home/sudheer/.local/lib/python2.7/site-packages/ansible
  executable location = /home/sudheer/.local/bin/ansible-playbook
  python version = 2.7.15 (default, Oct 15 2018, 15:26:09) [GCC 8.2.1 20180801 (Red Hat 8.2.1-2)]
Using /etc/ansible/ansible.cfg as config file
Parsed all, inventory source with host_list plugin
 [WARNING]: Found both group and host with same name: all


PLAYBOOK: aruba.yml ***********************************************************************************************************************************************************************************************
1 plays in aruba.yml

PLAY [all] ********************************************************************************************************************************************************************************************************

TASK [Gathering Facts] ********************************************************************************************************************************************************************************************
task path: /home/sudheer/aruba.yml:2
<all> ESTABLISH LOCAL CONNECTION FOR USER: sudheer
<all> EXEC /bin/sh -c 'echo ~sudheer && sleep 0'
<all> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/sudheer/.ansible/tmp/ansible-tmp-1557828965.19-207615568817961 `" && echo ansible-tmp-1557828965.19-207615568817961="` echo /home/sudheer/.ansible/tmp/ansible-tmp-1557828965.19-207615568817961 `" ) && sleep 0' Using module file /home/sudheer/.local/lib/python2.7/site-packages/ansible/modules/system/setup.py <all> PUT /home/sudheer/.ansible/tmp/ansible-local-28452hbNPWC/tmpkiq8zK TO /home/sudheer/.ansible/tmp/ansible-tmp-1557828965.19-207615568817961/AnsiballZ_setup.py <all> EXEC /bin/sh -c 'chmod u+x /home/sudheer/.ansible/tmp/ansible-tmp-1557828965.19-207615568817961/ /home/sudheer/.ansible/tmp/ansible-tmp-1557828965.19-207615568817961/AnsiballZ_setup.py && sleep 0' <all> EXEC /bin/sh -c '/usr/bin/python /home/sudheer/.ansible/tmp/ansible-tmp-1557828965.19-207615568817961/AnsiballZ_setup.py && sleep 0' <all> EXEC /bin/sh -c 'rm -f -r /home/sudheer/.ansible/tmp/ansible-tmp-1557828965.19-207615568817961/ > /dev/null 2>&1 && sleep 0'
ok: [all]
META: ran handlers

TASK [run show version on remote devices] *************************************************************************************************************************************************************************
task path: /home/sudheer/aruba.yml:5
<192.168.3.5> using connection plugin network_cli (was local)
The full traceback is:
Traceback (most recent call last):
  File "/home/sudheer/.local/bin/ansible-connection", line 106, in start
    self.connection._connect()
  File "/home/sudheer/.local/lib/python2.7/site-packages/ansible/plugins/connection/network_cli.py", line 336, in _connect
    self._terminal.on_open_shell()
  File "/home/sudheer/.local/lib/python2.7/site-packages/ansible/plugins/terminal/aruba.py", line 68, in on_open_shell
    raise AnsibleConnectionFailure('unable to set terminal parameters')
AnsibleConnectionFailure: unable to set terminal parameters

fatal: [all]: FAILED! => {
    "msg": "unable to set terminal parameters"
}
    to retry, use: --limit @/home/sudheer/aruba.retry

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

What am I doing wrong?

-

Sudheer S

--
You received this message because you are subscribed to the Google Groups "Ansible 
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/866a7b2d-3f5c-869d-d197-1fb9d511bebd%40techchorus.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to