You need to practice somes to familiar with Ansible first. Then set some small targets using ansible to manage. So far I know switch, router devices don't have python inside which must have to manage by ansible.
I suggest you use model : Ansible control --> Jump server --> cisco devices. (I use this model to do backup task all devices in my environment labs)
Ansible control: ansible installed, use playbook variable to manage quantity/type of devices, use templates to send scripts to Jump server to execute.
Jum server: Python installed, expect installed. Only use for executing scripts to manage devices (upgrade, backup, etc..)
### playbook.yml sample
---
- hosts: jumpserver
become: yes
become_method: su
gather_facts: no
ignore_errors: yes
roles:
- upgrade_cisco_router
- backup_router
####upgrade_cisco_router roles sample:
## roles/tasks/main.yml
---
- name: Prepare upgrade scripts
template: src=upgrade_cisco_router.exp.j2 dest=/root/upgrade_cisco_router_{{ item }}.exp mode=0774
with_items:
- {{ cisco_router }}
- name: Start upgrade
raw: /root/upgrade_cisco_router_{{ item }}.exp
with_items:
- {{ cisco_router }}
## roles/vars/main.yml
---
cisco_router: ["10.10.10.5", "10.10.10.6"]
## roles/templates/upgrade_cisco_router.exp.j2
<contain script to upgrade cisco router>