Nxos_vlans range (via string) to database

Is there a way to add a range of vlans to the vlan database? With nxos_vlan I could input a string variable with either say vlan id 5 OR 5,6 OR 5-7, ect. Then use the code

 - name: Add Vlans to database
        nxos_vlan:
        vlan_range: "{{ vlans }}"

Then I could leverage the same vlans and add it to the l2interface as a single vlan, separate by a comma or a range with a dash:

nxos_l2_interfaces:
        name: "{{ interface_num }}"
        mode: trunk
        trunk_allowed_vlans: "{{ vlans }}"
  • nxos_vlans, cisco.nxos.nxos

The newer nxos_vlans function is integer only I guess and can’t parse multiple vlans.

edit: Looks like I can work around this by using the nxos.commands module to add vlans to the database but it would be nice to have the vlan_range from nxos_vlan carry over.

Thanks for the help!