equinix.metal.ip_info (1.4.1) — module

Gather information about project IP Addresses

| "added in version" 1.4.0 of equinix.metal"

Authors: Jason DeTiberus (@detiber) <jdetiberus@equinix.com>

Install collection

Install with ansible-galaxy collection install equinix.metal:==1.4.1


Add to requirements.yml

  collections:
    - name: equinix.metal
      version: 1.4.1

Description

Gather information about project IP addresses in Equinix Metal.

See U(https://metal.equinix.com/developers/api/ipaddresses/) for more info on IP Addresses.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# All the examples assume that you have your Equinix Metal API token in env var METAL_API_TOKEN.
# You can also pass it to the api_token parameter of the module instead.

- name: Gather information about all devices
  hosts: localhost
  tasks:
    - equinix.metal.ip_info:
        project_id: 89b497ee-5afc-420a-8fb5-56984898f4df

Inputs

    
api_token:
    aliases:
    - auth_token
    description:
    - The Equinix Metal API token to use
    - If not set, then the value of the METAL_API_TOKEN, PACKET_API_TOKEN, or PACKET_TOKEN
      environment variable is used.
    required: true
    type: str

project_id:
    description:
    - Project ID.
    required: true
    type: str

Outputs

ips:
  description: Information about each ip address that was found
  returned: always
  sample: '[{"address": "136.144.57.174", "address_family": 4, "assigned_to": null,
    "cidr": 32, "created_at": "2021-01-05T18:55:55Z", "customdata": {}, "details":
    null, "enabled": true, "facility": "dc13", "gateway": "136.144.57.174", "global_ip":
    false, "id": "d6764db0-69c6-44e9-922e-18146608cd3a", "interface": null, "management":
    false, "netmask": "255.255.255.255", "network": "136.144.57.174", "project_id":
    "f2a2d7ad-886e-4207-bf38-10ebdf49cf84", "public": true, "tags": ["cluster-api-provider-packet:cluster-id:versiontest"]}]'
  type: list