Skip to content

[Bug]: Unable to remove rack from device using netbox_device #1475

@RobinR1

Description

@RobinR1

Ansible NetBox Collection version

3.21.0

Ansible version

Version: 2.16.14

NetBox version

4.3.7

Python version

3.8

Steps to Reproduce

  • Ensure you have a device {{ device_hostname }} with a rack, face and position assigned.
  • Next try to remove the rack from the device:
- name: Update device
  delegate_to: localhost
  netbox.netbox.netbox_device:
    netbox_url: "{{ netbox_url }}"
    netbox_token: "{{ netbox_token }}"
    data:
      name: "{{ device_hostname }}"
      rack: ''
      face: ''
      position: ''

I tried using empty string '' and {{ None }}. Neither work.

Expected Behavior

rack, face and position are cleared on the device.

Observed Behavior

More than one result returned for rack.

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