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}}”