nxos spanning tree vlan priority

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”
],

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