I'm new to ansible.  I've tried several switch and router versions.  All 
attempts result in the same error.

I am able to log into the switch from my ansible host as the network-users.

ansible-playbook 2.4.2.0
  config file = /home/mccamish.ladm/ansible/ansible.cfg
  configured module search path = 
[u'/home/mccamish/.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-playbook
  python version = 2.7.5 (default, May  3 2017, 07:55:04) [GCC 4.8.5 
20150623 (Red Hat 4.8.5-14)]

Red Hat Enterprise Linux Server release 7.4 (Maipo)

Inventory file "testing"
10.0.0.37

shvers.yml:
---
- name: Show Version
  hosts: all
  connection: local
  gather_facts: false

  tasks:
  - name: RUN CLI CMD
    ios_command:
      provider: "{{ credentials }}"
      authorize: yes
      commands: show version

...

group_vars/all.yml:
---

credentials:
  host: "{{ inventory_hostname }}"
  username: network-user
  password: "user_pass"
  auth_pass: "ena_pass"
  authorize: yes

...

CLI:
ansible-playbook -i ./testing shvers.yml

Error:
2018-02-26 09:28:24,200 p=22755 u=mccamish |   22755 1519655304.19986: 
Loading Connection 'ssh' from 
/usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.py 
(found_in_cache=False, class_only=True)
2018-02-26 09:28:24,223 p=22755 u=mccamish |   22755 1519655304.22316: 
assigned :doc
2018-02-26 09:28:24,225 p=22755 u=mccamish |   22755 1519655304.22509: 
Loaded config def from plugin (connection/ssh)
2018-02-26 09:28:24,235 p=22755 u=mccamish |  creating new control socket 
for host 10.0.0.37:22 as user network-user
2018-02-26 09:28:24,236 p=22755 u=mccamish |  control socket path is 
/home/mccamish/.ansible/pc/6ffc5aca16
2018-02-26 09:28:24,236 p=22755 u=mccamish |  current working directory is 
/home/mccamish/ansible
2018-02-26 09:28:24,237 p=22755 u=mccamish |  using connection plugin 
network_cli
2018-02-26 09:28:24,299 p=22755 u=mccamish |   22762 1519655304.29920: 
Loading Connection 'network_cli' from 
/usr/lib/python2.7/site-packages/ansible/plugins/connection/network_cli.py
2018-02-26 09:28:24,302 p=22755 u=mccamish |   22762 1519655304.30265: 
Loading ShellModule 'csh' from 
/usr/lib/python2.7/site-packages/ansible/plugins/shell/csh.py
2018-02-26 09:28:24,303 p=22755 u=mccamish |   22762 1519655304.30366: 
Loading ShellModule 'fish' from 
/usr/lib/python2.7/site-packages/ansible/plugins/shell/fish.py
2018-02-26 09:28:24,305 p=22755 u=mccamish |   22762 1519655304.30498: 
Loading ShellModule 'powershell' from 
/usr/lib/python2.7/site-packages/ansible/plugins/shell/powershell.py
2018-02-26 09:28:24,305 p=22755 u=mccamish |   22762 1519655304.30526: 
Loading ShellModule 'sh' from 
/usr/lib/python2.7/site-packages/ansible/plugins/shell/sh.py
2018-02-26 09:28:24,305 p=22755 u=mccamish |   22762 1519655304.30586: 
Loading ShellModule 'sh' from 
/usr/lib/python2.7/site-packages/ansible/plugins/shell/sh.py 
(found_in_cache=True, class_only=False)
2018-02-26 09:28:24,316 p=22755 u=mccamish |   22762 1519655304.31596: 
assigned :doc
2018-02-26 09:28:24,317 p=22755 u=mccamish |   22762 1519655304.31691: 
Loaded config def from plugin (connection/network_cli)
2018-02-26 09:28:25,712 p=22755 u=mccamish |  ssh connection done, setting 
terminal
2018-02-26 09:28:26,746 p=22755 u=mccamish |   22762 1519655306.74595: 
Loading TerminalModule 'ios' from 
/usr/lib/python2.7/site-packages/ansible/plugins/terminal/ios.py
2018-02-26 09:28:26,746 p=22755 u=mccamish |  loaded terminal plugin for 
network_os ios
2018-02-26 09:28:26,754 p=22755 u=mccamish |   22762 1519655306.75454: 
Loading Cliconf 'ios' from 
/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/ios.py
2018-02-26 09:28:26,755 p=22755 u=mccamish |  loaded cliconf plugin for 
network_os ios
2018-02-26 09:28:26,756 p=22755 u=mccamish |  firing event: on_open_shell()
2018-02-26 09:28:26,795 p=22755 u=mccamish |  connecting to host 10.0.0.37 
returned an error
2018-02-26 09:28:26,795 p=22755 u=mccamish |  unable to set terminal 
parameters

And this is also output:
2018-02-26 09:28:54,354 p=22742 u=mccamish |  fatal: [10.0.0.37]: FAILED! 
=> {"changed": false, "msg": "unable to open shell. Please see: 
https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell"}

Looking at that page, I don't see anything about "unable to set terminal 
parameters"

Thanks,
Scott

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/ca33a6c7-b0b8-4a9b-90b2-10dfd85ff4d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to