netbox.netbox.netbox_device_type – Create, update or delete device types within Netbox¶
Note
This plugin is part of the netbox.netbox collection.
To install it use: ansible-galaxy collection install netbox.netbox
.
To use it in a playbook, specify: netbox.netbox.netbox_device_type
.
New in version 0.1.0: of
Parameters¶
Notes¶
Note
Tags should be defined as a YAML list
This should be ran with connection
local
and hostslocalhost
Examples¶
- name: "Test Netbox modules"
connection: local
hosts: localhost
gather_facts: False
tasks:
- name: Create device type within Netbox with only required information
netbox_device_type:
netbox_url: http://netbox.local
netbox_token: thisIsMyToken
data:
slug: test-device-type
model: ws-test-3750
manufacturer: Test Manufacturer
state: present
- name: Create device type within Netbox with only required information
netbox_device_type:
netbox_url: http://netbox.local
netbox_token: thisIsMyToken
data:
slug: test-device-type
model: ws-test-3750
manufacturer: Test Manufacturer
part_number: ws-3750g-v2
u_height: 1
is_full_depth: False
subdevice_role: parent
state: present
- name: Delete device type within netbox
netbox_device_type:
netbox_url: http://netbox.local
netbox_token: thisIsMyToken
data:
slug: test-device-type
state: absent
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Mikhail Yohman (@FragmentedPacket)