Skip to content

[Bug]: Breaking changes in 3.6.0, device_role -> role #1061

Closed
@shaul75

Description

@shaul75

PR: #1062

Ansible NetBox Collection version

v3.14.0

Ansible version

https://github.com/netbox-community/netbox/releases/tag/v3.6.0

The device_role field on the Device model has been renamed to role. The device_role field has been temporarily retained on the REST API serializer for devices for backward compatibility, but is read-only.

NetBox version

v3.6.0

Python version

3.10

Steps to Reproduce

      netbox.netbox.netbox_device:
        data:
          name: "{{ ansible_facts['product_name'] }}"
          device_type: "{{ ansible_facts['product_name'] }}"
          device_role: 1
          site: 1
        state: present

Expected Behavior

Device is created/updated

Observed Behavior

{"role":["This field is required."]}
fatal: [10.0.20.10 -> localhost]: FAILED! => {
    "changed": false
}

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