Skip to content

[Bug]: Changing order of permissions causes unnecessary update #1455

@dchiquito

Description

@dchiquito

Ansible NetBox Collection version

v3.10.0

Ansible version

ansible [core 2.18.8]
  config file = /home/daniel/git/ansible_modules/ansible.cfg
  configured module search path = ['/home/daniel/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/daniel/.local/lib/python3.13/site-packages/ansible
  ansible collection location = /home/daniel/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/daniel/.local/bin/ansible
  python version = 3.13.3 (main, Apr 22 2025, 00:00:00) [GCC 15.0.1 20250418 (Red Hat 15.0.1-0)] (/usr/bin/python3)
  jinja version = 3.1.6
  libyaml = True

NetBox version

v3.4.0

Python version

3.11

Steps to Reproduce

There is an existing user with existing permissions ['foo', 'bar'], and a playbook like this is run:

- name: "Update user"
  netbox.netbox.netbox_user:
    data:
      username: MyUser
      permissions:
        - bar
        - foo
    state: present

Expected Behavior

The user will not be updated, because the permission sets are equivalent.

Observed Behavior

The user is updated, because the permission lists are considered different.

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