` for details.
To use it in a playbook, specify: :code:`codeaffen.phpipam.device`.
.. version_added
.. rst-class:: ansible-version-added
New in codeaffen.phpipam 0.5.0
.. contents::
:local:
:depth: 1
.. Deprecated
Synopsis
--------
.. Description
- create, update and delete devices
.. Aliases
.. Requirements
.. _ansible_collections.codeaffen.phpipam.device_module_requirements:
Requirements
------------
The below requirements are needed on the host that executes this module.
- inflection
- ipaddress
- phpypam\>=1.0.0
.. 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.codeaffen.phpipam.device_module__parameter-app_id:
.. rst-class:: ansible-option-title
**app_id**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
API app name
.. rst-class:: ansible-option-line
:ansible-option-default-bold:`Default:` :ansible-option-default:`"ansible"`
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.device_module__parameter-description:
.. rst-class:: ansible-option-title
**description**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
A descriptive text for that entity
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.device_module__parameter-hostname:
.. rst-class:: ansible-option-title
**hostname**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string` / :ansible-option-required:`required`
.. raw:: html
- .. raw:: html
Hostname of the given device
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.device_module__parameter-ipaddress:
.. rst-class:: ansible-option-title
**ipaddress**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
IP address of the given device
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.device_module__parameter-location:
.. rst-class:: ansible-option-title
**location**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
Device location
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.device_module__parameter-password:
.. rst-class:: ansible-option-title
**password**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string` / :ansible-option-required:`required`
.. raw:: html
- .. raw:: html
Password of the user to access phpIPAM server
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.device_module__parameter-rack:
.. rst-class:: ansible-option-title
**rack**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
Rack where the device belongs to.
If set :emphasis:`starting\_rack\_unit` and :emphasis:`rack\_units` are also required.
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.device_module__parameter-rack_units:
.. rst-class:: ansible-option-title
**rack_units**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`integer`
.. raw:: html
- .. raw:: html
Size of device in :emphasis:`U`.
If set :emphasis:`rack` and :emphasis:`starting\_rack\_unit` are also required.
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.device_module__parameter-sections:
.. rst-class:: ansible-option-title
**sections**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`list` / :ansible-option-elements:`elements=string`
.. raw:: html
- .. raw:: html
List of sections where the device belongs to
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.device_module__parameter-server_url:
.. rst-class:: ansible-option-title
**server_url**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string` / :ansible-option-required:`required`
.. raw:: html
- .. raw:: html
URL of the phpIPAM server
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.device_module__parameter-snmp_community:
.. rst-class:: ansible-option-title
**snmp_community**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
The SNMP community string
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.device_module__parameter-snmp_port:
.. rst-class:: ansible-option-title
**snmp_port**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
The used SNMP port
.. rst-class:: ansible-option-line
:ansible-option-default-bold:`Default:` :ansible-option-default:`"161"`
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.device_module__parameter-snmp_queries:
.. rst-class:: ansible-option-title
**snmp_queries**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.device_module__parameter-snmp_timeout:
.. rst-class:: ansible-option-title
**snmp_timeout**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
The SNMP connection timeout
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.device_module__parameter-snmp_v3_auth_pass:
.. rst-class:: ansible-option-title
**snmp_v3_auth_pass**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
The password to authenticate via SNMPv3
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.device_module__parameter-snmp_v3_auth_protocol:
.. rst-class:: ansible-option-title
**snmp_v3_auth_protocol**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
The used SNMPv3 auth protocol
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.device_module__parameter-snmp_v3_ctx_engine_id:
.. rst-class:: ansible-option-title
**snmp_v3_ctx_engine_id**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
CTX engine id when using SNMPv3
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.device_module__parameter-snmp_v3_ctx_name:
.. rst-class:: ansible-option-title
**snmp_v3_ctx_name**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
CTX name when using SNMPv3
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.device_module__parameter-snmp_v3_priv_pass:
.. rst-class:: ansible-option-title
**snmp_v3_priv_pass**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
The password to authenticate via SNMPv3 in privacy mode
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.device_module__parameter-snmp_v3_priv_protocol:
.. rst-class:: ansible-option-title
**snmp_v3_priv_protocol**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
The used SNMPv3 privacy protocol
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.device_module__parameter-snmp_v3_sec_level:
.. rst-class:: ansible-option-title
**snmp_v3_sec_level**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
The used SNMPv3 security level
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.device_module__parameter-snmp_version:
.. rst-class:: ansible-option-title
**snmp_version**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
The used SNMP version
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.device_module__parameter-starting_rack_unit:
.. rst-class:: ansible-option-title
**starting_rack_unit**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
Which is the starting rack unit where the device is mounted.
If set :emphasis:`rack` and :emphasis:`racK\_units` are also required.
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.device_module__parameter-state:
.. rst-class:: ansible-option-title
**state**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
State of the entity
.. 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.codeaffen.phpipam.device_module__parameter-type:
.. rst-class:: ansible-option-title
**type**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
Device type of this device.
The value has to reflect values from device types configured.
Default device types are :emphasis:`Switch`\ , :emphasis:`Router`\ , :emphasis:`Firewall`\ , :emphasis:`Hub`\ , :emphasis:`Wireless`\ , :emphasis:`Database`\ , :emphasis:`Workstation`\ , :emphasis:`Laptop` and :emphasis:`Other`.
User defined types can be created either via UI, API (e.g. :emphasis:`device\_type` ansible module within this collection).
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.device_module__parameter-username:
.. rst-class:: ansible-option-title
**username**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string` / :ansible-option-required:`required`
.. raw:: html
- .. raw:: html
Username to access phpIPAM server
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.device_module__parameter-validate_certs:
.. rst-class:: ansible-option-title
**validate_certs**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`boolean`
.. raw:: html
- .. raw:: html
Is the TLS certificate of the phpIPAM server verified or not.
.. rst-class:: ansible-option-line
:ansible-option-choices:`Choices:`
- :ansible-option-choices-entry:`false`
- :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)`
.. raw:: html
.. Attributes
.. Notes
.. Seealso
.. Examples
Examples
--------
.. code-block:: yaml+jinja
- name: "Create device"
codeaffen.phpipam.device:
username: "admin"
password: "s3cr3t"
server_url: "https://ipam.example.com"
hostname: "leaf-example-01"
ipaddress: "192.0.2.222"
sections:
- Example Inc.
- DEVOPS department
state: present
- name: "Remove device"
codeaffen.phpipam.device:
username: "admin"
password: "s3cr3t"
server_url: "https://ipam.example.com"
name: "leaf-example-001"
state: absent
.. Facts
.. Return values
.. Status (Presently only deprecated)
.. Authors
Authors
~~~~~~~
- Christian Meißner (@cmeissner)
.. Extra links
Collection links
~~~~~~~~~~~~~~~~
.. ansible-links::
- title: "Issue Tracker"
url: "https://github.com/codeaffen/phpipam-ansible-modules/issues"
external: true
- title: "Homepage"
url: "https://codeaffen.org/projects/phpipam-ansible-modules"
external: true
- title: "Repository (Sources)"
url: "https://github.com/codeaffen/phpipam-ansible-modules"
external: true
.. Parsing errors