Skip to content

Commit aeaa468

Browse files
richbibbyKenneth Joss
authored and
Kenneth Joss
committed
1333 feature update netbox device interface template (netbox-community#1345)
* Add new options for interface template creation This commit adds new options for creating interface templates in NetBox. The new options include the ability to specify a label, enable or disable the template, and provide a description. These options were added in version 3.21.0 of the plugin. * added changelog fragment * Update 1333-feature-netbox_device_interface_template.yml new line to fix linting
1 parent 9c18584 commit aeaa468

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
minor_changes:
2+
- Add `label`, `description` and `enabled` to `netbox_device_interface_template` (https://github.com/netbox-community/ansible_modules/issues/1333)

plugins/modules/netbox_device_interface_template.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@
3939
- Name of the interface template to be created
4040
required: true
4141
type: str
42+
label:
43+
description:
44+
- The label of the interface template
45+
required: false
46+
type: str
47+
version_added: '3.21.0'
4248
type:
4349
description:
4450
- |
@@ -47,11 +53,23 @@
4753
This has to be specified exactly as what is found within UI
4854
required: true
4955
type: str
56+
enabled:
57+
description:
58+
- Whether or not the interface template to be created should be enabled
59+
required: false
60+
type: bool
61+
version_added: '3.21.0'
5062
mgmt_only:
5163
description:
5264
- This interface template is used only for out-of-band management
5365
required: false
5466
type: bool
67+
description:
68+
description:
69+
- Description of the interface template
70+
required: false
71+
type: str
72+
version_added: '3.21.0'
5573
poe_mode:
5674
description:
5775
- This interface has PoE ability (NetBox release 3.3 and later)
@@ -129,11 +147,14 @@ def main():
129147
options=dict(
130148
device_type=dict(required=True, type="raw"),
131149
name=dict(required=True, type="str"),
150+
label=dict(required=False, type="str"),
132151
type=dict(
133152
required=True,
134153
type="str",
135154
),
155+
enabled=dict(required=False, type="bool"),
136156
mgmt_only=dict(required=False, type="bool"),
157+
description=dict(required=False, type="str"),
137158
poe_type=dict(required=False, type="raw"),
138159
poe_mode=dict(required=False, type="raw"),
139160
),

0 commit comments

Comments
 (0)