` for details.
To use it in a playbook, specify: :code:`netbox.netbox.netbox_contact_assignment`.
.. version_added
.. rst-class:: ansible-version-added
New in netbox.netbox 3.1.0
.. contents::
:local:
:depth: 1
.. Deprecated
Synopsis
--------
.. Description
- Creates or removes contact assignments from NetBox
.. Aliases
.. Requirements
.. _ansible_collections.netbox.netbox.netbox_contact_assignment_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_contact_assignment_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_contact_assignment_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 contact configuration
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.netbox.netbox.netbox_contact_assignment_module__parameter-data/contact:
.. rst-class:: ansible-option-title
**contact**
.. 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 contact to assign to the object
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.netbox.netbox.netbox_contact_assignment_module__parameter-data/object_name:
.. rst-class:: ansible-option-title
**object_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 object the contact is assigned to
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.netbox.netbox.netbox_contact_assignment_module__parameter-data/object_type:
.. rst-class:: ansible-option-title
**object_type**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string` / :ansible-option-required:`required`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
The type of the object the contact is assigned to
.. rst-class:: ansible-option-line
:ansible-option-choices:`Choices:`
- :ansible-option-choices-entry:`"circuit"`
- :ansible-option-choices-entry:`"cluster"`
- :ansible-option-choices-entry:`"cluster\_group"`
- :ansible-option-choices-entry:`"device"`
- :ansible-option-choices-entry:`"location"`
- :ansible-option-choices-entry:`"manufacturer"`
- :ansible-option-choices-entry:`"power\_panel"`
- :ansible-option-choices-entry:`"provider"`
- :ansible-option-choices-entry:`"rack"`
- :ansible-option-choices-entry:`"region"`
- :ansible-option-choices-entry:`"site"`
- :ansible-option-choices-entry:`"site\_group"`
- :ansible-option-choices-entry:`"tenant"`
- :ansible-option-choices-entry:`"virtual\_machine"`
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.netbox.netbox.netbox_contact_assignment_module__parameter-data/priority:
.. rst-class:: ansible-option-title
**priority**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
The priority of this contact
.. rst-class:: ansible-option-line
:ansible-option-choices:`Choices:`
- :ansible-option-choices-entry:`"primary"`
- :ansible-option-choices-entry:`"secondary"`
- :ansible-option-choices-entry:`"tertiary"`
- :ansible-option-choices-entry:`"inactive"`
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.netbox.netbox.netbox_contact_assignment_module__parameter-data/role:
.. rst-class:: ansible-option-title
**role**
.. 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 role the contact has for this object
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.netbox.netbox.netbox_contact_assignment_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`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
Any tags that the contact may need to be associated with
.. raw:: html
* - .. raw:: html
.. _ansible_collections.netbox.netbox.netbox_contact_assignment_module__parameter-headers:
.. rst-class:: ansible-option-title
**headers**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`dictionary`
.. raw:: html
- .. raw:: html
Dictionary of headers to be passed to the NetBox API.
.. raw:: html
* - .. raw:: html
.. _ansible_collections.netbox.netbox.netbox_contact_assignment_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_contact_assignment_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_contact_assignment_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_contact_assignment_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_contact_assignment_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 module"
connection: local
hosts: localhost
gather_facts: false
tasks:
- name: Assign a contact to a location with only required information
netbox.netbox.netbox_contact_assignment:
netbox_url: http://netbox.local
netbox_token: thisIsMyToken
data:
object_type: location
object_name: My Location
contact: John Doe
role: Supervisor Role
state: present
- name: Delete contact assignment within netbox
netbox.netbox.netbox_contact_assignment:
netbox_url: http://netbox.local
netbox_token: thisIsMyToken
data:
object_type: location
object_name: My Location
contact: John Doe
role: Supervisor Role
state: absent
- name: Create contact with all parameters
netbox.netbox.netbox_contact:
netbox_url: http://netbox.local
netbox_token: thisIsMyToken
data:
object_type: location
object_name: My Location
contact: John Doe
role: Supervisor Role
priority: tertiary
tags:
- tagA
- tagB
- tagC
state: present
.. 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_contact_assignment_module__return-contact_assignment:
.. rst-class:: ansible-option-title
**contact_assignment**
.. 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:` on creation
.. raw:: html
* - .. raw:: html
.. _ansible_collections.netbox.netbox.netbox_contact_assignment_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
.. Status (Presently only deprecated)
.. Authors
Authors
~~~~~~~
- Daniel Chiquito (@dchiquito)
.. 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