- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2022 06:54 AM
Hi All,
I am trying to setup Ansible with Cisco IOS but receive error listed below. I have provided details below. (attached screen shot for reference)
TASK [run multiple commands on remote nodes] ***********************************
fatal: [CSR1]: FAILED! => {"msg": "network os iOS is not supported"}
Ansible Version: ansible 2.9.27
=====================Host File=================
## Ansible Hosts File for Home Lab
[all:vars]
ansible_user=dhruv
ansible_ssh_pass=cisco
ansible_network_os=iOS
ansible_connection=network_cli
[CSR-Router]
CSR1 ansible_host=192.168.111.10
# host all : refer to all the devices
====== Playbook ================
---
- name: show version and other user level commands
hosts: all
gather_facts: false
connection: local
tasks:
- name: run multiple commands on remote nodes
ios_command:
commands:
- show version
- show ip int brief
- show cry isa sa details
register: print_output
- debug: var=print_output.stdout_lines
============== configuration File =====================
[defaults]
inventory = /home/dhruv/babi.com/hosts
host_key_checking = False
# Don’t worry about RSA Fingerprints
retry_files_enabled = False
# Do not create retry files on job failure
forks = 4
# The number of devices Ansible can connect at once. By default it connects with 5 devices at one time.
Regards,
Dhruv
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2022 07:22 AM
Hi @dhr.tech1
Have you tried
ansible_network_os=ios
In network automation work its important to pay attention to case. iOS does not equal ios
Apologies if its not that simple and that was just an auto correct thing in your text!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2022 07:22 AM
Hi @dhr.tech1
Have you tried
ansible_network_os=ios
In network automation work its important to pay attention to case. iOS does not equal ios
Apologies if its not that simple and that was just an auto correct thing in your text!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2022 01:16 AM
Hi, thanks for the update it worked last night. I updated the host file as below.
[all:vars]
ansible_user=dhruv
ansible_ssh_pass=cisco
ansible_network_os=ios
[CSR-Router]
CSR1 ansible_host=192.168.111.10
# host all : refer to all the devices
