Skip to content

Commit

Permalink
feat: Add status option to netbox_cluster module (#1283)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
richbibby committed Jul 6, 2024
1 parent f1ea03a commit 33c74be
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- Add `status` to `netbox_cluster` (https://github.com/netbox-community/ansible_modules/issues/1275)
10 changes: 9 additions & 1 deletion plugins/modules/netbox_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@
- The name of the cluster
required: true
type: str
status:
description:
- Status of the cluster
required: false
type: raw
version_added: "3.20.0"
cluster_type:
description:
- type of the cluster
Expand Down Expand Up @@ -114,7 +120,7 @@
- Schnozzberry
state: present
- name: Update the group and site of an existing cluster
- name: Update the group, site and status of an existing cluster
netbox.netbox.netbox_cluster:
netbox_url: http://netbox.local
netbox_token: thisIsMyToken
Expand All @@ -123,6 +129,7 @@
cluster_type: qemu
cluster_group: GROUP
site: SITE
status: planned
state: present
"""

Expand Down Expand Up @@ -160,6 +167,7 @@ def main():
required=True,
options=dict(
name=dict(required=True, type="str"),
status=dict(required=False, type="raw"),
cluster_type=dict(required=False, type="raw"),
cluster_group=dict(required=False, type="raw"),
site=dict(required=False, type="raw"),
Expand Down

0 comments on commit 33c74be

Please sign in to comment.