` for details.
To use it in a playbook, specify: :code:`codeaffen.phpipam.subnet`.
.. version_added
.. rst-class:: ansible-version-added
New in codeaffen.phpipam 0.0.1
.. contents::
:local:
:depth: 1
.. Deprecated
Synopsis
--------
.. Description
- create, update and delete subnets
.. Aliases
.. Requirements
.. _ansible_collections.codeaffen.phpipam.subnet_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.subnet_module__parameter-allow_requests:
.. rst-class:: ansible-option-title
**allow_requests**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`boolean`
.. raw:: html
- .. raw:: html
Controls if IP requests are allowed for subnet
.. rst-class:: ansible-option-line
:ansible-option-choices:`Choices:`
- :ansible-option-choices-entry-default:`false` :ansible-option-choices-default-mark:`← (default)`
- :ansible-option-choices-entry:`true`
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.subnet_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.subnet_module__parameter-cidr:
.. rst-class:: ansible-option-title
**cidr**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
Network in CIDR format.
Mutually exclusive with :emphasis:`subnet` and :emphasis:`mask`.
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.subnet_module__parameter-description:
.. rst-class:: ansible-option-title
**description**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
Text which is shown in side bar if 'show as name' is selected
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.subnet_module__parameter-discover_subnet:
.. rst-class:: ansible-option-title
**discover_subnet**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`boolean`
.. raw:: html
- .. raw:: html
Controls if new hosts should be discovered for new host scans
.. rst-class:: ansible-option-line
:ansible-option-choices:`Choices:`
- :ansible-option-choices-entry-default:`false` :ansible-option-choices-default-mark:`← (default)`
- :ansible-option-choices-entry:`true`
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.subnet_module__parameter-dns_records:
.. rst-class:: ansible-option-title
**dns_records**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`boolean`
.. raw:: html
- .. raw:: html
Controls whether hostname DNS records are displayed
.. rst-class:: ansible-option-line
:ansible-option-choices:`Choices:`
- :ansible-option-choices-entry-default:`false` :ansible-option-choices-default-mark:`← (default)`
- :ansible-option-choices-entry:`true`
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.subnet_module__parameter-dns_recursive:
.. rst-class:: ansible-option-title
**dns_recursive**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`boolean`
.. raw:: html
- .. raw:: html
Controls if PTR records should be created for subnet
.. rst-class:: ansible-option-line
:ansible-option-choices:`Choices:`
- :ansible-option-choices-entry-default:`false` :ansible-option-choices-default-mark:`← (default)`
- :ansible-option-choices-entry:`true`
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.subnet_module__parameter-folder:
.. rst-class:: ansible-option-title
**folder**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
folder name which subnet belongs to
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.subnet_module__parameter-is_full:
.. rst-class:: ansible-option-title
**is_full**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`boolean`
.. raw:: html
- .. raw:: html
Marks subnet as used
.. rst-class:: ansible-option-line
:ansible-option-choices:`Choices:`
- :ansible-option-choices-entry-default:`false` :ansible-option-choices-default-mark:`← (default)`
- :ansible-option-choices-entry:`true`
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.subnet_module__parameter-linked_subnet:
.. rst-class:: ansible-option-title
**linked_subnet**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
Linked ipv6 subnet in CIDR format
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.subnet_module__parameter-location:
.. rst-class:: ansible-option-title
**location**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
Subnet location
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.subnet_module__parameter-mask:
.. rst-class:: ansible-option-title
**mask**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
Prefix length (bits) for ipv4 and ipv6 subnets.
Mutually exclusive with :emphasis:`cidr`.
If set. :emphasis:`subnet` is required.
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.subnet_module__parameter-nameserver:
.. rst-class:: ansible-option-title
**nameserver**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
Name of the DNS server which should attach to subnet
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.subnet_module__parameter-master_subnet_cidr:
.. _ansible_collections.codeaffen.phpipam.subnet_module__parameter-parent:
.. rst-class:: ansible-option-title
**parent**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-aliases:`aliases: master_subnet_cidr`
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
CIDR of parent subnet
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.subnet_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.subnet_module__parameter-permissions:
.. rst-class:: ansible-option-title
**permissions**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`json`
.. raw:: html
- .. raw:: html
JSON object that represent the permissions for each user
.. rst-class:: ansible-option-line
:ansible-option-default-bold:`Default:` :ansible-option-default:`"None"`
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.subnet_module__parameter-ping_subnet:
.. rst-class:: ansible-option-title
**ping_subnet**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`boolean`
.. raw:: html
- .. raw:: html
Controls if subnet should be included in status checks
.. rst-class:: ansible-option-line
:ansible-option-choices:`Choices:`
- :ansible-option-choices-entry-default:`false` :ansible-option-choices-default-mark:`← (default)`
- :ansible-option-choices-entry:`true`
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.subnet_module__parameter-routing_domain:
.. rst-class:: ansible-option-title
**routing_domain**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
:ansible-option-versionadded:`added in codeaffen.phpipam 1.6.0`
.. raw:: html
- .. raw:: html
Layer-2 routing domain the vlan belongs to
If you have :emphasis:`vlan` with same number in different routing domains it need to be set on desired value
.. rst-class:: ansible-option-line
:ansible-option-default-bold:`Default:` :ansible-option-default:`"default"`
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.subnet_module__parameter-scan_agent:
.. rst-class:: ansible-option-title
**scan_agent**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
Name of scanagent which should be used for subnet
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.subnet_module__parameter-section:
.. rst-class:: ansible-option-title
**section**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`integer` / :ansible-option-required:`required`
.. raw:: html
- .. raw:: html
Name of the section under which the subnet is located
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.subnet_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.subnet_module__parameter-show_as_name:
.. rst-class:: ansible-option-title
**show_as_name**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`boolean`
.. raw:: html
- .. raw:: html
If this is set to 'true' description is shown in side bar instead of CIDR
.. rst-class:: ansible-option-line
:ansible-option-choices:`Choices:`
- :ansible-option-choices-entry-default:`false` :ansible-option-choices-default-mark:`← (default)`
- :ansible-option-choices-entry:`true`
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.subnet_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.subnet_module__parameter-subnet:
.. rst-class:: ansible-option-title
**subnet**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
Network address
Mutually exclusive with :emphasis:`cidr`.
If set, :emphasis:`mask` is required.
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.subnet_module__parameter-subnet_state:
.. rst-class:: ansible-option-title
**subnet_state**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
Assigned tag of the subnet.
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.subnet_module__parameter-threshold:
.. rst-class:: ansible-option-title
**threshold**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`integer`
.. raw:: html
- .. raw:: html
Subnet threshold
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.subnet_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.subnet_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
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.subnet_module__parameter-vlan:
.. rst-class:: ansible-option-title
**vlan**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
VLAN which the subnet should belongs to
.. raw:: html
* - .. raw:: html
.. _ansible_collections.codeaffen.phpipam.subnet_module__parameter-vrf:
.. rst-class:: ansible-option-title
**vrf**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
VRF which the subnet should belongs to
.. raw:: html
.. Attributes
.. Notes
.. Seealso
.. Examples
Examples
--------
.. code-block:: yaml+jinja
- name: "Create a subnet"
codeaffen.phpipam.subnet:
username: "admin"
password: "s3cr3t"
server_url: "https://ipam.example.com"
cidr: "192.0.2.128/26"
section: "EXAMPLE INC"
state: present
- name: "Create a subnet with parent"
codeaffen.phpipam.subnet:
username: "admin"
password: "s3cr3t"
server_url: "https://ipam.example.com"
cidr: "192.0.2.128/28"
parent: "192.0.2.128/25"
section: "DEVOPS department"
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.codeaffen.phpipam.subnet_module__return-entity:
.. rst-class:: ansible-option-title
**entity**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`dictionary`
.. raw:: html
- .. raw:: html
Final state of the affected entities grouped by their type.
.. rst-class:: ansible-option-line
:ansible-option-returned-bold:`Returned:` success
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.codeaffen.phpipam.subnet_module__return-entity/subnets:
.. rst-class:: ansible-option-title
**subnets**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`list` / :ansible-option-elements:`elements=dictionary`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
List of subnets.
.. rst-class:: ansible-option-line
:ansible-option-returned-bold:`Returned:` success
.. raw:: html
.. 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