ansible-collections/cisco.nxos

output' value text is not supported for run_commands"

KarimNajj opened this issue · 1 comments

SUMMARY

I am trying to configure a Nexus switch using ansible cisco.nxos.nxos modules but every time I run a playbook to configure a feature such as VLAN,HSRP,vPC,... the same error is occuring.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

cisco.nxos.nxos collection

ANSIBLE VERSION
ansible [core 2.15.6]
COLLECTION VERSION

CONFIGURATION

OS / ENVIRONMENT
STEPS TO REPRODUCE
---
- name : hsrp
  hosts: all
  gather_facts: no 
  tasks:
    - name: access vlan yaml
      include_vars:
         file: /home/karim/test/python/vlanstest.yaml
         name: v
    - name: Configure hsrp attributes on interfaces
      cisco.nxos.nxos_hsrp:
          group: "{{item.value.group}}"
          vip: "{{item.value.vip}}"
          priority: "{{item.value.priority}}"
          interface: "{{item.value.interface}}"
          preempt: enabled
      with_dict: "{{ v[inventory_hostname]['FHRP'] }}"
EXPECTED RESULTS

To be able to use modules from cisco.nxos.nxos
Note: I made sure that the playbook is reading all the values which are passed by using debug module

ACTUAL RESULTS

Failed to execute the playbook:
The same error is occuring for most of the module of cisco.nxos expect for cisco.nxos.nxos_l2_interfaces, this error is coming from the nxos.py file in the run_commands function

redirecting (type: action) cisco.nxos.nxos_hsrp to cisco.nxos.nxos
redirecting (type: action) cisco.nxos.nxos_hsrp to cisco.nxos.nxos
failed: [xx.xx.xx.xxx] (item={'key': 'HSRP 20', 'value': {'protocol': 'HSRP', 'priority': 110, 'vip': '10.10.20.2', 'group': 20, 'interface': 'VLAN20'}}) => {
    "ansible_loop_var": "item",
    "changed": false,
    "item": {
        "key": "HSRP 20",
        "value": {
            "group": 20,
            "interface": "VLAN20",
            "priority": 110,
            "protocol": "HSRP",
            "vip": "10.10.20.2"
        }
    },
    "module_stderr": "'output' value text is not supported for run_commands",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error"
}

Hey @KarimNajj I see that you closed this issue - what did you do to resolve the issue?