nxos spanning tree vlan priority

25 views
Skip to first unread message

Richard Lucht

unread,
Dec 18, 2020, 11:09:56 AM12/18/20
to Ansible Project
I am having some issues in a playbook I am working on.  When I create a vlan on a nxos I want to set the spanning-tree vlan "{{ vlan }}" root primary.  what I have when it runs errors on me.  This is the last bit I need for my playbook to work.

    - name: Set vlan root primary
      nxos_config:
        lines: spanning-tree vlan "{{ vlan }}" root primary



I get this


{
    "msg": "spanning-tree vlan \"25\" root primary\r\r\n                                               ^\r\n% Invalid command at '^' marker.\r\n\rMikeThunderdome-5K(config)# ",
    "invocation": {
        "module_args": {
            "lines": [
                "spanning-tree vlan \"25\" root primary"
            ],

Richard Lucht

unread,
Dec 18, 2020, 11:33:54 AM12/18/20
to ansible...@googlegroups.com
Figured it out

I changed it to this and it works 

    - nameSet vlan root primary
      nxos_config:
        lines
        - spanning-tree vlan {{ vlan }} root primary


--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/dc1f70e0-e7fc-4029-8dad-918e020fc824n%40googlegroups.com.


--
Regards,

Richard Lucht


Reply all
Reply to author
Forward
0 new messages