codeaffen.phpipam.device module – Manage devices¶
Note
This module is part of the codeaffen.phpipam collection (version 1.7.0).
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
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: codeaffen.phpipam.device
.
New in codeaffen.phpipam 0.5.0
Synopsis¶
create, update and delete devices
Requirements¶
The below requirements are needed on the host that executes this module.
inflection
ipaddress
phpypam>=1.0.0
Parameters¶
Parameter |
Comments |
---|---|
API app name Default: |
|
A descriptive text for that entity |
|
Hostname of the given device |
|
IP address of the given device |
|
Password of the user to access phpIPAM server |
|
Rack where the device belongs to. If set starting_rack_unit and rack_units are also required. |
|
Size of device in U. If set rack and starting_rack_unit are also required. |
|
List of sections where the device belongs to |
|
URL of the phpIPAM server |
|
The SNMP community string |
|
The used SNMP port Default: |
|
The SNMP connection timeout |
|
The password to authenticate via SNMPv3 |
|
The used SNMPv3 auth protocol |
|
CTX engine id when using SNMPv3 |
|
CTX name when using SNMPv3 |
|
The password to authenticate via SNMPv3 in privacy mode |
|
The used SNMPv3 privacy protocol |
|
The used SNMPv3 security level |
|
The used SNMP version |
|
Which is the starting rack unit where the device is mounted. If set rack and racK_units are also required. |
|
State of the entity Choices:
|
|
Device type of this device. The value has to reflect values from device types configured. Default device types are Switch, Router, Firewall, Hub, Wireless, Database, Workstation, Laptop and Other. User defined types can be created either via UI, API (e.g. device_type ansible module within this collection). |
|
Username to access phpIPAM server |
|
Is the TLS certificate of the phpIPAM server verified or not. Choices:
|
Examples¶
- 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