netbox.netbox.netbox_site_group – Create, update, or delete site groups within NetBox¶
Note
This plugin is part of the netbox.netbox collection (version 3.4.0).
To install it use: ansible-galaxy collection install netbox.netbox
.
To use it in a playbook, specify: netbox.netbox.netbox_site_group
.
New in version 3.4.0: of netbox.netbox
Synopsis¶
Creates, updates, or deletes site groups within NetBox
Requirements¶
The below requirements are needed on the host that executes this module.
pynetbox
Parameters¶
Notes¶
Note
Tags should be defined as a YAML list
This should be ran with connection
local
and hostslocalhost
Examples¶
- name: "Test NetBox site group module"
connection: local
hosts: localhost
gather_facts: False
tasks:
- name: Create site group within NetBox with only required information
netbox.netbox.netbox_site_group:
netbox_url: http://netbox.local
netbox_token: thisIsMyToken
data:
name: Site group
state: present
- name: Create site group within NetBox with a parent site group
netbox.netbox.netbox_site_group:
netbox_url: http://netbox.local
netbox_token: thisIsMyToken
data:
name: Child site group
parent_site_group: Site group
state: present
- name: Delete site group within NetBox
netbox.netbox.netbox_site_group:
netbox_url: http://netbox.local
netbox_token: thisIsMyToken
data:
name: Site group
state: absent
Return Values¶
Common return values are documented here, the following are the fields unique to this module: