Skip to content

Latest commit

 

History

History
1097 lines (566 loc) · 22.3 KB

device_module.rst

File metadata and controls

1097 lines (566 loc) · 22.3 KB
orphan:

codeaffen.phpipam.device module -- Manage devices

Note

This module is part of the codeaffen.phpipam collection (version 1.6.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.device.

.. versionadded:: 0.5.0 of codeaffen.phpipam

  • create, update and delete devices

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
.. rst-class:: ansible-option-title

app_id

.. rst-class:: ansible-option-type-line

string

API app name

.. rst-class:: ansible-option-line

Default: "ansible"

.. rst-class:: ansible-option-title

description

.. rst-class:: ansible-option-type-line

string

A descriptive text for that entity

.. rst-class:: ansible-option-title

hostname

.. rst-class:: ansible-option-type-line

string / required

Hostname of the given device

.. rst-class:: ansible-option-title

ipaddress

.. rst-class:: ansible-option-type-line

string

IP address of the given device

.. rst-class:: ansible-option-title

password

.. rst-class:: ansible-option-type-line

string / required

Password of the user to access phpIPAM server

.. rst-class:: ansible-option-title

rack

.. rst-class:: ansible-option-type-line

string

Rack where the device belongs to.

If set starting_rack_unit and rack_units are also required.

.. rst-class:: ansible-option-title

rack_units

.. rst-class:: ansible-option-type-line

integer

Size of device in U.

If set rack and starting_rack_unit are also required.

.. rst-class:: ansible-option-title

sections

.. rst-class:: ansible-option-type-line

list / elements=string

List of sections where the device belongs to

.. rst-class:: ansible-option-title

server_url

.. rst-class:: ansible-option-type-line

string / required

URL of the phpIPAM server

.. rst-class:: ansible-option-title

snmp_community

.. rst-class:: ansible-option-type-line

string

The SNMP community string

.. rst-class:: ansible-option-title

snmp_port

.. rst-class:: ansible-option-type-line

string

The used SNMP port

.. rst-class:: ansible-option-line

Default: 161

.. rst-class:: ansible-option-title

snmp_queries

.. rst-class:: ansible-option-type-line

string

.. rst-class:: ansible-option-title

snmp_timeout

.. rst-class:: ansible-option-type-line

string

The SNMP connection timeout

.. rst-class:: ansible-option-title

snmp_v3_auth_pass

.. rst-class:: ansible-option-type-line

string

The password to authenticate via SNMPv3

.. rst-class:: ansible-option-title

snmp_v3_auth_protocol

.. rst-class:: ansible-option-type-line

string

The used SNMPv3 auth protocol

.. rst-class:: ansible-option-title

snmp_v3_ctx_engine_id

.. rst-class:: ansible-option-type-line

string

CTX engine id when using SNMPv3

.. rst-class:: ansible-option-title

snmp_v3_ctx_name

.. rst-class:: ansible-option-type-line

string

CTX name when using SNMPv3

.. rst-class:: ansible-option-title

snmp_v3_priv_pass

.. rst-class:: ansible-option-type-line

string

The password to authenticate via SNMPv3 in privacy mode

.. rst-class:: ansible-option-title

snmp_v3_priv_protocol

.. rst-class:: ansible-option-type-line

string

The used SNMPv3 privacy protocol

.. rst-class:: ansible-option-title

snmp_v3_sec_level

.. rst-class:: ansible-option-type-line

string

The used SNMPv3 security level

.. rst-class:: ansible-option-title

snmp_version

.. rst-class:: ansible-option-type-line

string

The used SNMP version

.. rst-class:: ansible-option-title

starting_rack_unit

.. rst-class:: ansible-option-type-line

string

Which is the starting rack unit where the device is mounted.

If set rack and racK_units are also required.

.. rst-class:: ansible-option-title

state

.. rst-class:: ansible-option-type-line

string

State of the entity

.. rst-class:: ansible-option-line

Choices:

  • present ← (default)
  • absent
.. rst-class:: ansible-option-title

type

.. rst-class:: ansible-option-type-line

string

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).

.. rst-class:: ansible-option-title

username

.. rst-class:: ansible-option-type-line

string / required

Username to access phpIPAM server

.. rst-class:: ansible-option-title

validate_certs

.. rst-class:: ansible-option-type-line

boolean

Is the TLS certificate of the phpIPAM server verified or not.

.. rst-class:: ansible-option-line

Choices:

  • no
  • yes ← (default)
- 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

Authors

  • Christian Meißner (@cmeissner)

Collection links

Issue Tracker Homepage Repository (Sources)