netbox_power_outlet
Create, update or delete power outlets within NetBox
Collection: netbox.netbox
Full Name: netbox.netbox.netbox_power_outlet
Synopsis
Create, update or delete power outlets within NetBox
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| cert | raw | Certificate path | ||
| data | dict | yes | Defines the power outlet configuration | |
| headers | dict | Dictionary of headers to be passed to the NetBox API. | ||
| netbox_token | string | yes | The NetBox API token. | |
| netbox_url | string | yes | The URL of the NetBox instance. | |
| Must be accessible by the Ansible control host. | ||||
| query_params | list | This can be used to override the specified values in ALLOWED_QUERY_PARAMS that are defined | ||
| in plugins/module_utils/netbox_utils.py and provides control to users on what may make | ||||
| an object unique in their environment. | ||||
| state | string | present | The state of the object. | |
| validate_certs | raw | true | If C(no), SSL certificates will not be validated. | |
| This should only be used on personally controlled sites using a self-signed certificates. |
Example
yaml
- name: Create power port within NetBox with only required information
netbox.netbox.netbox_power_outlet:
netbox_url: http://netbox.local
netbox_token: thisIsMyToken
data:
name: Test Power Outlet
device: Test Device
state: present
- name: Update power port with other fields
netbox.netbox.netbox_power_outlet:
netbox_url: http://netbox.local
netbox_token: thisIsMyToken
data:
name: Test Power Outlet
device: Test Device
type: iec-60320-c6
power_port: Test Power Port
feed_leg: A
description: power port description
state: present
- name: Delete power port within netbox
netbox.netbox.netbox_power_outlet:
netbox_url: http://netbox.local
netbox_token: thisIsMyToken
data:
name: Test Power Outlet
device: Test Device
state: absent