Skip to content

[Bug]: netbox_tag module: slug not set as defined #1404

@jfunke4

Description

@jfunke4

Ansible NetBox Collection version

v3.20.0

Ansible version

ansible [core 2.15.4]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/runner/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  ansible collection location = /runner/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.9.16 (main, May 31 2023, 12:21:58) [GCC 8.5.0 20210514 (Red Hat 8.5.0-18)] (/usr/bin/python3.9)
  jinja version = 3.1.2
  libyaml = True

NetBox version

v4.0.11

Python version

3.9

Steps to Reproduce

Create a tag with the netbox_tag module and define a name and a slug for this new tag.
When the slug contains two dashes (--) the netbox modules creates the tag with a slug, that only one dash (-) contains.

Example:
Module:
netbox.netbox.netbox_tag:
data:
name: "customer123"
slug: "customer--123"

Result in Netbox:
slug "customer-123"

Expected Behavior

Creation of the tag as defined in the module.

Observed Behavior

One dash is removed during the creation of the Tag

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions