codeaffen.phpipam.address – Manage addresses

Note

This plugin is part of the codeaffen.phpipam collection.

To install it use: ansible-galaxy collection install codeaffen.phpipam.

To use it in a playbook, specify: codeaffen.phpipam.address.

New in version 0.2.0: of codeaffen.phpipam

Synopsis

  • create, update and delete addresses

Requirements

The below requirements are needed on the host that executes this module.

  • inflection
  • ipaddress
  • phpypam>=1.0.0

Parameters

Parameter Choices/Defaults Comments
app_id
string
Default:
"ansible"
API app name
description
string
Address description
device
string
Device address belongs to
exclude_ping
boolean
    Choices:
  • no
  • yes
Exclude this address from status update scans
hostname
string
Address hostname
ignore_ptr
boolean
    Choices:
  • no ←
  • yes
Controls if PTR should not be created
ipaddress
string / required
IP address to hanle

aliases: ip, address
is_gateway
boolean
    Choices:
  • no ←
  • yes
Defines if address is presented as gateway
mac_address
string
Mac address

aliases: mac
note
string
Note
owner
string
Address owner
password
string / required
Password of the user to access phpIPAM server
port
string
Port
ptr
string
DNS PTR record
section
string / required
added in 1.3.1 of codeaffen.phpipam
name of the section the given subnet belongs to
server_url
string / required
URL of the phpIPAM server
state
string
    Choices:
  • present ←
  • absent
State of the entity
subnet
string / required
subnet address belongs to
tag
string
IP tag (online, offline, ...)
username
string / required
Username to access phpIPAM server
validate_certs
boolean
    Choices:
  • no
  • yes ←
Is the TLS certificate of the phpIPAM server verified or not.

Examples

- name: "Reserve a IP address"
  codeaffen.phpipam.section:
    username: "admin"
    password: "s3cr3t"
    server_url: "https://ipam.example.com"
    address: "192.0.2.1"
    description: "Default router of sunet"
    subnet: "192.0.2.0/24"
    is_gateway: yes
    state: present

- name: "Remove address reservation"
  codeaffen.phpipam.section:
    username: "admin"
    password: "s3cr3t"
    server_url: "https://ipam.example.com"
    address: "192.0.2.1"
    subnet: "192.0.2.0/24"
    state: absent

Authors

  • Christian Meißner (@cmeissner)