Figured it out

I changed it to this and it works

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


On Fri, Dec 18, 2020 at 10:10 AM Richard Lucht <[email protected]>
wrote:

> 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"
>             ],
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/dc1f70e0-e7fc-4029-8dad-918e020fc824n%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/dc1f70e0-e7fc-4029-8dad-918e020fc824n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Regards,

Richard Lucht
[image: Cisco Certified Network Associate Routing and Switching (CCNA
Routing and Switching)][image: Cisco Certified Network Associate Security
(CCNA Security)]
(402)639-1503 | [email protected]

<https://www.linkedin.com/pub/richard-lucht/16/48b/8b2>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CACT9_J-4ZY%2BpY3rqoKHv%3D7eGvK6s-shqy-jz6oqCcdRDT-qJVA%40mail.gmail.com.

Reply via email to