Skip to content

[Bug]: PR to fix the device_role module has been merged but I don't see the fix live #1093

@richardjohnallsopp

Description

@richardjohnallsopp

Ansible NetBox Collection version

v3.14.0

Ansible version

ansible==2.10.6
ansible-base==2.10.13

NetBox version

v3.6.2

Python version

3.9

Steps to Reproduce

I see this PR is merged, but I don't see the fix reflected in the documentation - #1066

    - name: Create devices within Netbox
      netbox.netbox.netbox_device:
        netbox_url: "{{ deployment_type }}"
        netbox_token: "{{ netbox_key }}"
        data:
          name: "{{ item.device }}"
          device_type: "{{ item.device_type }}"
          device_role: "{{ item.device_role }}"
          site: "{{ site }}"
          rack: "{{ item.rack }}"
          position: "{{ item.position | default(omit) }}"
          face: "{{ item.face | default(omit) }}"
        state: present
      with_items: "{{ devices }}"
      when: devices is defined
      tags:
        - base_devices

Expected Behavior

I would have expected to see role used instead of device_role.

Observed Behavior

  ansible_loop_var: item
  item:
    device: ch02-m200-ups-01
    device_role: UPS
    device_type: APC Smart-UPS SRT 5000VA
    face: Front
    position: 1
    rack: CH02-MDF-200-RACK-01
    site: ch02
    status: Active
  msg: '{"role":["This field is required."]}'
failed: [localhost] (item={'device': 'ch02-m200-ups-02', 'device_type': 'APC Smart-UPS SRT 5000VA', 'device_role': 'UPS', 'site': 'ch02', 'rack': 'CH02-MDF-200-RACK-01', 'position': 4, 'face': 'Front', 'status': 'Active'}) => changed=false 
  ansible_loop_var: item
  item:
    device: ch02-m200-ups-02
    device_role: UPS
    device_type: APC Smart-UPS SRT 5000VA
    face: Front
    position: 4
    rack: CH02-MDF-200-RACK-01
    site: ch02
    status: Active
  msg: '{"role":["This field is required."]}'

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