codeaffen.phpipam.device (1.7.0) — module

Manage devices

| "added in version" 0.5.0 of codeaffen.phpipam"

Authors: Christian Meißner (@cmeissner)

Install collection

Install with ansible-galaxy collection install codeaffen.phpipam:==1.7.0


Add to requirements.yml

  collections:
    - name: codeaffen.phpipam
      version: 1.7.0

Description

create, update and delete devices


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: "Remove device"
  codeaffen.phpipam.device:
    username: "admin"
    password: "s3cr3t"
    server_url: "https://ipam.example.com"
    name: "leaf-example-001"
    state: absent

Inputs

    
rack:
    description:
    - Rack where the device belongs to.
    - If set I(starting_rack_unit) and I(rack_units) are also required.
    required: false
    type: str

type:
    description:
    - Device type of this device.
    - The value has to reflect values from device types configured.
    - Default device types are I(Switch), I(Router), I(Firewall), I(Hub), I(Wireless),
      I(Database), I(Workstation), I(Laptop) and I(Other).
    - User defined types can be created either via UI, API (e.g. I(device_type) ansible
      module within this collection).
    required: false
    type: str

state:
    choices:
    - present
    - absent
    default: present
    description: State of the entity
    type: str

app_id:
    default: ansible
    description: API app name
    required: false
    type: str

hostname:
    description: Hostname of the given device
    required: true
    type: str

password:
    description: Password of the user to access phpIPAM server
    required: true
    type: str

sections:
    description: List of sections where the device belongs to
    required: false
    type: list

username:
    description: Username to access phpIPAM server
    required: true
    type: str

ipaddress:
    description: IP address of the given device
    required: false
    type: str

snmp_port:
    default: 161
    description: The used SNMP port
    required: false
    type: str

rack_units:
    description:
    - Size of device in I(U).
    - If set I(rack) and I(starting_rack_unit) are also required.
    required: false
    type: int

server_url:
    description: URL of the phpIPAM server
    required: true
    type: str

description:
    description: A descriptive text for that entity
    required: false
    type: str

snmp_queries:
    description: null
    required: false
    type: str

snmp_timeout:
    description: The SNMP connection timeout
    required: false
    type: str

snmp_version:
    description: The used SNMP version
    required: false
    type: str

snmp_community:
    description: The SNMP community string
    required: false
    type: str

validate_certs:
    default: true
    description: Is the TLS certificate of the phpIPAM server verified or not.
    required: false
    type: bool

snmp_v3_ctx_name:
    description: CTX name when using SNMPv3
    required: false
    type: str

snmp_v3_auth_pass:
    description: The password to authenticate via SNMPv3
    required: false
    type: str

snmp_v3_priv_pass:
    description: The password to authenticate via SNMPv3 in privacy mode
    required: false
    type: str

snmp_v3_sec_level:
    description: The used SNMPv3 security level
    required: false
    type: str

starting_rack_unit:
    description:
    - Which is the starting rack unit where the device is mounted.
    - If set I(rack) and I(racK_units) are also required.

snmp_v3_auth_protocol:
    description: The used SNMPv3 auth protocol
    required: false
    type: str

snmp_v3_ctx_engine_id:
    description: CTX engine id when using SNMPv3
    required: false
    type: str

snmp_v3_priv_protocol:
    description: The used SNMPv3 privacy protocol
    required: false
    type: str