0

I am trying to run a simple playbook that changes some STP parameters, but I cannot understand where the following error comes from:

fatal: [Sw3]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "pn_bpdus_bridge_ports": null,
            "pn_bridge_id": null,
            "pn_bridge_priority": "120",
            "pn_cliswitch": "Sw3",
            "pn_enable": null,
            "pn_forwarding_delay": "15",
            "pn_hello_time": "2",
            "pn_max_age": "20",
            "pn_mst_config_name": null,
            "pn_mst_max_hops": "20",
            "pn_root_guard_wait_time": "20",
            "pn_stp_mode": null,
            "state": "update"
        }
    },
    "msg": "ime 20 mst-max-hops 20 max-age 20 forwarding-delay 15 bridge-priority 120\r\n switch Sw3 stp-modify  hello-time 2 root-guard-wait-time 20 mst-max-hops 20 max-age 20 forwarding-delay 15 bridge-priority 120\r\n  ^\r\n% Invalid input detected at '^' marker.\r\n\r\nSw3#",
    "rc": -32603
}

This is my playbook and my switch is a Cisco 7200:

---
- name: STP switch configuration
  gather_facts: no
  hosts: Sw3
  connection: network_cli

  tasks:

    - name: STP bridge priority
      community.network.pn_stp:
        pn_cliswitch: "{{ inventory_hostname }}"
        pn_bridge_priority: "120" # default 32768
        state: update
      tags: stp_bridge_priority
U880D
  • 8,601
  • 6
  • 24
  • 40
Anda
  • 670
  • 7
  • 7
  • At a first glance at documentation [community.network.pn_stp](https://docs.ansible.com/ansible/latest/collections/community/network/pn_stp_module.html) and source [community.network/plugins/modules/network/netvisor/pn_stp.py](https://github.com/ansible-collections/community.network/blob/main/plugins/modules/network/netvisor/pn_stp.py) the playbook seems to be OK so far. However, the error message states `^ % Invalid input detected at '^' marker.` so some input might be incorrect. – U880D Feb 10 '22 at 09:50
  • I do not understand which input you are referring to? Is it the switch's configuration? – Anda Feb 11 '22 at 20:08
  • As mentioned, your task seems to be OK according docs and source at a first glance. However, the error message states `Invalid input detected`. Maybe it is coming from an already existing config, or the default values don't fit as according your task only `pn_bridge_priority` becomes defined whereby all other values were set to default. – U880D Feb 11 '22 at 20:13

0 Answers0