orphan: |
---|
Note
This module is part of the codeaffen.phpipam collection (version 1.7.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install codeaffen.phpipam
.
To use it in a playbook, specify: codeaffen.phpipam.subnet
.
.. versionadded:: 0.0.1 of codeaffen.phpipam
- create, update and delete subnets
The below requirements are needed on the host that executes this module.
- inflection
- ipaddress
- phpypam>=1.0.0
.. rst-class:: ansible-option-table
Parameter | Comments |
---|---|
Controls if IP requests are allowed for subnet .. rst-class:: ansible-option-line Choices:
|
|
API app name .. rst-class:: ansible-option-line Default: "ansible" |
|
Network in CIDR format. Mutually exclusive with subnet and mask. |
|
Text which is shown in side bar if 'show as name' is selected |
|
Controls if new hosts should be discovered for new host scans .. rst-class:: ansible-option-line Choices:
|
|
Controls whether hostname DNS records are displayed .. rst-class:: ansible-option-line Choices:
|
|
Controls if PTR records should be created for subnet .. rst-class:: ansible-option-line Choices:
|
|
folder name which subnet belongs to |
|
Marks subnet as used .. rst-class:: ansible-option-line Choices:
|
|
Linked ipv6 subnet in CIDR format |
|
Subnet location |
|
Prefix length (bits) for ipv4 and ipv6 subnets. Mutually exclusive with cidr. If set. subnet is required. |
|
Name of the DNS server which should attach to subnet |
|
CIDR of parent subnet |
|
Password of the user to access phpIPAM server |
|
JSON object that represent the permissions for each user .. rst-class:: ansible-option-line Default: "None" |
|
Controls if subnet should be included in status checks .. rst-class:: ansible-option-line Choices:
|
|
Layer-2 routing domain the vlan belongs to If you have vlan with same number in different routing domains it need to be set on desired value .. rst-class:: ansible-option-line Default: "default" |
|
Name of scanagent which should be used for subnet |
|
Name of the section under which the subnet is located |
|
URL of the phpIPAM server |
|
If this is set to 'true' description is shown in side bar instead of CIDR .. rst-class:: ansible-option-line Choices:
|
|
State of the entity .. rst-class:: ansible-option-line Choices:
|
|
Network address Mutually exclusive with cidr. If set, mask is required. |
|
Assigned tag of the subnet. |
|
Subnet threshold |
|
Username to access phpIPAM server |
|
Is the TLS certificate of the phpIPAM server verified or not. .. rst-class:: ansible-option-line Choices:
|
|
VLAN which the subnet should belongs to |
|
VRF which the sunet should belongs to |
- 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
Common return values are documented :ref:`here <common_return_values>`, the following are the fields unique to this module:
.. rst-class:: ansible-option-table
Key | Description |
---|---|
Final state of the affected entities grouped by their type. .. rst-class:: ansible-option-line Returned: success |
|
List of subnets. .. rst-class:: ansible-option-line Returned: success |
- Christian Meißner (@cmeissner)