Ansible - Authentication timeout error

213 views
Skip to first unread message

benilde tadonkeng

unread,
Jul 15, 2021, 6:59:49 PM7/15/21
to Ansible Development
Hi every one,

I'm trying to pull out some information from a cisco switch device using ios_facts module, for exemple ios version using ansible.
By running the playbook, the following message appears: 

PLAY [Host(s) name] *********************************************************************************************************************

TASK [Display ios facts] ****************************************************************************************************************
fatal: [10.27.160.1]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/libexec/platform-python"}, "changed": false, "msg": "Failed to authenticate: Authentication timeout."}

PLAY RECAP ******************************************************************************************************************************
10.27.160.1                : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0


The inventory hosts file looks like :

[swradius]
10.27.160.1

 [swradius:vars]
   ansible_connection = network_cli
   ansible_network_os = ios
   ansible_user = telecom
   ansible_password = jtaciusss!adm

and here below is the playbook itself:

- - -
- name: Host(s) name
  hosts: swradius
  gather_facts: false


  tasks:

    - name: Display ios facts
      ios_facts:
        gather_subset: all

    - name: Display the current ios version
      debug:
        msg: "The current ios version is {{ansible_net_version}}"
~
I'm very confused beceause i can reach the same device using SSH connexion and  the same credentials through Puty without problem. It delays a litle bit but it works after all.

Could somebody help me please!

Thank's in advance!

Reply all
Reply to author
Forward
0 new messages