` for details.
To use it in a playbook, specify: :code:`netbox.netbox.netbox_vlan_group`.
.. version_added
.. rst-class:: ansible-version-added
New in netbox.netbox 0.1.0
.. contents::
:local:
:depth: 1
.. Deprecated
Synopsis
--------
.. Description
- Creates, updates or removes vlans groups from NetBox
.. Aliases
.. Requirements
.. _ansible_collections.netbox.netbox.netbox_vlan_group_module_requirements:
Requirements
------------
The below requirements are needed on the host that executes this module.
- pynetbox
.. Options
Parameters
----------
.. tabularcolumns:: \X{1}{3}\X{2}{3}
.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table
* - Parameter
- Comments
* - .. raw:: html
.. _ansible_collections.netbox.netbox.netbox_vlan_group_module__parameter-cert:
.. rst-class:: ansible-option-title
**cert**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`any`
.. raw:: html
- .. raw:: html
Certificate path
.. raw:: html
* - .. raw:: html
.. _ansible_collections.netbox.netbox.netbox_vlan_group_module__parameter-data:
.. rst-class:: ansible-option-title
**data**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`dictionary` / :ansible-option-required:`required`
.. raw:: html
- .. raw:: html
Defines the vlan group configuration
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.netbox.netbox.netbox_vlan_group_module__parameter-data/custom_fields:
.. rst-class:: ansible-option-title
**custom_fields**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`dictionary`
:ansible-option-versionadded:`added in netbox.netbox 3.1.0`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
must exist in NetBox
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.netbox.netbox.netbox_vlan_group_module__parameter-data/description:
.. rst-class:: ansible-option-title
**description**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
:ansible-option-versionadded:`added in netbox.netbox 3.1.0`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
Description for VLAN group
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.netbox.netbox.netbox_vlan_group_module__parameter-data/max_vid:
.. rst-class:: ansible-option-title
**max_vid**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`integer`
:ansible-option-versionadded:`added in netbox.netbox 3.7.0`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
Highest permissible ID of a child VLAN
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.netbox.netbox.netbox_vlan_group_module__parameter-data/min_vid:
.. rst-class:: ansible-option-title
**min_vid**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`integer`
:ansible-option-versionadded:`added in netbox.netbox 3.7.0`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
Lowest permissible ID of a child VLAN
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.netbox.netbox.netbox_vlan_group_module__parameter-data/name:
.. rst-class:: ansible-option-title
**name**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string` / :ansible-option-required:`required`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
The name of the vlan group
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.netbox.netbox.netbox_vlan_group_module__parameter-data/scope:
.. rst-class:: ansible-option-title
**scope**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`any`
:ansible-option-versionadded:`added in netbox.netbox 3.1.0`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
Object related to scope type (NetBox 2.11+)
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.netbox.netbox.netbox_vlan_group_module__parameter-data/scope_type:
.. rst-class:: ansible-option-title
**scope_type**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
:ansible-option-versionadded:`added in netbox.netbox 3.1.0`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
Type of scope to be applied (NetBox 2.11+)
.. rst-class:: ansible-option-line
:ansible-option-choices:`Choices:`
- :ansible-option-choices-entry:`"dcim.location"`
- :ansible-option-choices-entry:`"dcim.rack"`
- :ansible-option-choices-entry:`"dcim.region"`
- :ansible-option-choices-entry:`"dcim.site"`
- :ansible-option-choices-entry:`"dcim.sitegroup"`
- :ansible-option-choices-entry:`"virtualization.cluster"`
- :ansible-option-choices-entry:`"virtualization.clustergroup"`
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.netbox.netbox.netbox_vlan_group_module__parameter-data/site:
.. rst-class:: ansible-option-title
**site**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`any`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
The site the vlan will be assigned to (NetBox \< 2.11)
Will be removed in version 5.0.0
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.netbox.netbox.netbox_vlan_group_module__parameter-data/slug:
.. rst-class:: ansible-option-title
**slug**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
The slugified version of the name or custom slug.
This is auto-generated following NetBox rules if not provided
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.netbox.netbox.netbox_vlan_group_module__parameter-data/tags:
.. rst-class:: ansible-option-title
**tags**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`list` / :ansible-option-elements:`elements=any`
:ansible-option-versionadded:`added in netbox.netbox 3.6.0`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
The tags to add/update
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.netbox.netbox.netbox_vlan_group_module__parameter-data/vid_ranges:
.. rst-class:: ansible-option-title
**vid_ranges**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`list` / :ansible-option-elements:`elements=any`
:ansible-option-versionadded:`added in netbox.netbox 3.20.0`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
Array of starting and ending VLAN ID pairs
.. raw:: html
* - .. raw:: html
.. _ansible_collections.netbox.netbox.netbox_vlan_group_module__parameter-netbox_token:
.. rst-class:: ansible-option-title
**netbox_token**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string` / :ansible-option-required:`required`
.. raw:: html
- .. raw:: html
The NetBox API token.
.. raw:: html
* - .. raw:: html
.. _ansible_collections.netbox.netbox.netbox_vlan_group_module__parameter-netbox_url:
.. rst-class:: ansible-option-title
**netbox_url**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string` / :ansible-option-required:`required`
.. raw:: html
- .. raw:: html
The URL of the NetBox instance.
Must be accessible by the Ansible control host.
.. raw:: html
* - .. raw:: html
.. _ansible_collections.netbox.netbox.netbox_vlan_group_module__parameter-query_params:
.. rst-class:: ansible-option-title
**query_params**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`list` / :ansible-option-elements:`elements=string`
.. raw:: html
- .. raw:: html
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.
.. raw:: html
* - .. raw:: html
.. _ansible_collections.netbox.netbox.netbox_vlan_group_module__parameter-state:
.. rst-class:: ansible-option-title
**state**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
The state of the object.
.. rst-class:: ansible-option-line
:ansible-option-choices:`Choices:`
- :ansible-option-choices-entry-default:`"present"` :ansible-option-choices-default-mark:`← (default)`
- :ansible-option-choices-entry:`"absent"`
.. raw:: html
* - .. raw:: html
.. _ansible_collections.netbox.netbox.netbox_vlan_group_module__parameter-validate_certs:
.. rst-class:: ansible-option-title
**validate_certs**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`any`
.. raw:: html
- .. raw:: html
If :literal:`no`\ , SSL certificates will not be validated.
This should only be used on personally controlled sites using a self-signed certificates.
.. rst-class:: ansible-option-line
:ansible-option-default-bold:`Default:` :ansible-option-default:`true`
.. raw:: html
.. Attributes
.. Notes
Notes
-----
.. note::
- Tags should be defined as a YAML list
- This should be ran with connection :literal:`local` and hosts :literal:`localhost`
.. Seealso
.. Examples
Examples
--------
.. code-block:: yaml+jinja
- name: "Test NetBox modules"
connection: local
hosts: localhost
gather_facts: false
tasks:
- name: Create vlan group within NetBox with only required information - Pre 2.11
netbox_vlan_group:
netbox_url: http://netbox.local
netbox_token: thisIsMyToken
data:
name: Test vlan group
site: Test Site
state: present
- name: Create vlan group within NetBox with only required information - Post 2.11
netbox_vlan_group:
netbox_url: http://netbox.local
netbox_token: thisIsMyToken
data:
name: Test vlan group
scope_type: "dcim.site"
scope: Test Site
state: present
- name: Create vlan group within NetBox with vid_ranges
netbox_vlan_group:
netbox_url: http://netbox.local
netbox_token: thisIsMyToken
data:
name: Test vlan group
vid_ranges: [
[1300, 1329],
[1, 2]
]
state: present
- name: Delete vlan group within netbox
netbox_vlan_group:
netbox_url: http://netbox.local
netbox_token: thisIsMyToken
data:
name: Test vlan group
state: absent
.. Facts
.. Return values
Return Values
-------------
Common return values are documented :ref:`here `, the following are the fields unique to this module:
.. tabularcolumns:: \X{1}{3}\X{2}{3}
.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table
* - Key
- Description
* - .. raw:: html
.. _ansible_collections.netbox.netbox.netbox_vlan_group_module__return-msg:
.. rst-class:: ansible-option-title
**msg**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
Message indicating failure or info about what has been achieved
.. rst-class:: ansible-option-line
:ansible-option-returned-bold:`Returned:` always
.. raw:: html
* - .. raw:: html
.. _ansible_collections.netbox.netbox.netbox_vlan_group_module__return-vlan_group:
.. rst-class:: ansible-option-title
**vlan_group**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`dictionary`
.. raw:: html
- .. raw:: html
Serialized object as created or already existent within NetBox
.. rst-class:: ansible-option-line
:ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ )
.. raw:: html
.. Status (Presently only deprecated)
.. Authors
Authors
~~~~~~~
- Mikhail Yohman (@FragmentedPacket)
.. Extra links
Collection links
~~~~~~~~~~~~~~~~
.. ansible-links::
- title: "Issue Tracker"
url: "https://github.com/netbox-community/ansible_modules/issues"
external: true
- title: "Repository (Sources)"
url: "https://github.com/netbox-community/ansible_modules"
external: true
.. Parsing errors