cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
481
Views
0
Helpful
0
Replies

Ansible - Issues to connect to MDS switch using httpapi module

skitbil
Level 1
Level 1

Hi,

Trying to connect to a MDS switch using the ansible.netcommon.httpapi module in order to just run a gather fact via the nxos module.

Here's how this basic playbook looks like:

---
- hosts: switch1
gather_facts: no
connection: ansible.netcommon.httpapi
collections:
- cisco.nxos
vars:
ansible_user: admin
ansible_password: "{{ passwordinput }}"
ansible_httpapi_port: 8443

tasks:
- name: Gather all legacy facts
cisco.nxos.nxos_facts:
gather_subset: all

The switch returns:

"msg": "[Errno 104] Connection reset by peer"

I have enabled nxapi feature on the switch and so on. Does anyone have an idea what I'm doing wrong here?

 

 

0 Replies 0
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: