- *Bug Report*

*COMPONENT NAME*

connection: network_cli

*Version:*
ansible 2.7.6
  config file = /etc/ansible/cisco/test/paramiko/ansible.cfg
  configured module search path = 
[u'/etc/ansible/ntc-ansible/ntc-ansible/library']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /bin/ansible
  python version = 2.7.5 (default, Aug  7 2019, 00:51:29) [GCC 4.8.5 
20150623 (Red Hat 4.8.5-39)]

 *Environment:*

Ansible OS: Red Hat Linux
Managed OS: Cisco IOS


Using connection: network_cli raises AnsibleConnectionFailure [Errno -2] 
Name or service not known

*Setting ansible.conf*

[paramiko_connection]
look_for_keys=False 


*Playbook*:

- name:  Cisco Catalyse
  hosts: hosts
  gather_facts: no

  vars:
    compliant_ios_version: xxx
    ansible_python_interpreter: /usr/bin/python3.6

  tasks:
    - name:  cisco facts
      ios_facts:

    - name: Copying image to flash
      ios_command:
        command:
          - "copy sftp://XXX/XXX.bin  bootflash:"
      vars:
        ansible_command_timeout: 18000
        delay_factor: 12


*group_vars: hosts.yml*

ansible_network_os: ios
ansible_user: user
ansible_pass: password
ansible_connection: network_cli
ansible_become_method: enable
ansible_become: yes


*Actual results:*

The full traceback is:
Traceback (most recent call last):
  File "/bin/ansible-connection", line 106, in start
    self.connection._connect()
  File 
"/usr/lib/python2.7/site-packages/ansible/plugins/connection/network_cli.py", 
line 307, in _connect
    ssh = self.paramiko_conn._connect()
  File 
"/usr/lib/python2.7/site-packages/ansible/plugins/connection/paramiko_ssh.py", 
line 250, in _connect
    self.ssh = SSH_CONNECTION_CACHE[cache_key] = self._connect_uncached()
  File 
"/usr/lib/python2.7/site-packages/ansible/plugins/connection/paramiko_ssh.py", 
line 370, in _connect_uncached
    raise AnsibleConnectionFailure(msg)
AnsibleConnectionFailure: [Errno -2] Name or service not known

fatal: [cisco]: FAILED! => {
    "msg": "[Errno -2] Name or service not known"

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/141f36f6-a83c-4c10-9e8d-eeeb39b7867c%40googlegroups.com.

Reply via email to