codeaffen.phpipam.location (1.7.0) — module

Manage locations

| "added in version" 1.4.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 locations


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: "Create with address"
  codeaffen.phpipam.location:
    username: "admin"
    password: "s3cr3t"
    server_url: "https://ipam.example.com"
    name: "my location"
    description: "my location description"
    address: "my location address"
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: "Create location with geo coordinates"
  codeaffen.phpipam.location:
    username: "admin"
    password: "s3cr3t"
    server_url: "https://ipam.example.com"
    name: "my location"
    description: "my location description"
    latitude: 123.456
    longitude: 123.456
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: "Remove location"
  codeaffen.phpipam.location:
    username: "admin"
    password: "s3cr3t"
    server_url: "https://ipam.example.com"
    name: "my location"
    state: absent

Inputs

    
name:
    description: Name of the given location
    required: true
    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

address:
    description:
    - Address of the given location
    - if I(resolv_location) is set to True, this address will be used to resolve the latitude
      and longitude
    - Mutually exclusive with latitude and longitude
    required: false
    type: str

latitude:
    description:
    - Latitude of the given location
    - if I(resolv_location) is set to True, this latitude will be used to resolve the
      address
    - This parameter is mutually exclusive with address
    - This parameter is required if I(longitude) is given
    required: false
    type: float

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

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

longitude:
    description:
    - Longitude of the given location
    - if I(resolv_location) is set to True, this longitude will be used to resolve the
      address
    - This parameter is mutually exclusive with address
    - This parameter is required if I(latitude) is given
    required: false
    type: float

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

description:
    description: Description of the given location
    required: false
    type: str

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

resolv_location:
    default: false
    description:
    - Resolve the given location
    - Requires network connectivity to https://nominatim.org/ to resolve the given address
    - If address can not be resolved, latitude and longitude will not be set
    required: false
    type: bool