Skip to content

Commit 33c74be

Browse files
authored
feat: Add status option to netbox_cluster module (#1283)
The `netbox_cluster` module now supports the `status` option, allowing users to specify the status of the cluster. This enhancement provides more flexibility in managing clusters within NetBox. Fixes #1275
1 parent f1ea03a commit 33c74be

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
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 `status` to `netbox_cluster` (https://github.com/netbox-community/ansible_modules/issues/1275)

plugins/modules/netbox_cluster.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@
3535
- The name of the cluster
3636
required: true
3737
type: str
38+
status:
39+
description:
40+
- Status of the cluster
41+
required: false
42+
type: raw
43+
version_added: "3.20.0"
3844
cluster_type:
3945
description:
4046
- type of the cluster
@@ -114,7 +120,7 @@
114120
- Schnozzberry
115121
state: present
116122
117-
- name: Update the group and site of an existing cluster
123+
- name: Update the group, site and status of an existing cluster
118124
netbox.netbox.netbox_cluster:
119125
netbox_url: http://netbox.local
120126
netbox_token: thisIsMyToken
@@ -123,6 +129,7 @@
123129
cluster_type: qemu
124130
cluster_group: GROUP
125131
site: SITE
132+
status: planned
126133
state: present
127134
"""
128135

@@ -160,6 +167,7 @@ def main():
160167
required=True,
161168
options=dict(
162169
name=dict(required=True, type="str"),
170+
status=dict(required=False, type="raw"),
163171
cluster_type=dict(required=False, type="raw"),
164172
cluster_group=dict(required=False, type="raw"),
165173
site=dict(required=False, type="raw"),

0 commit comments

Comments
 (0)