ansible.builtin.hcloud_network_info (v2.9.25) — module

Gather info about your Hetzner Cloud networks.

| "added in version" 2.9 of ansible.builtin"

Authors: Christopher Schmitt (@cschmitt-hcloud)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.9.25

Description

Gather info about your Hetzner Cloud networks.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Gather hcloud network info
  local_action:
    module: hcloud_network_info
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Print the gathered info
  debug:
    var: hcloud_network_info

Inputs

    
id:
    description:
    - The ID of the network you want to get.
    type: int

name:
    description:
    - The name of the network you want to get.
    type: str

endpoint:
    default: https://api.hetzner.cloud/v1
    description:
    - This is the API Endpoint for the Hetzner Cloud.
    type: str

api_token:
    description:
    - This is the API Token for the Hetzner Cloud.
    required: true
    type: str

label_selector:
    description:
    - The label selector for the network you want to get.
    type: str

Outputs

hcloud_network_info:
  contains:
    id:
      description: Numeric identifier of the network
      returned: always
      sample: 1937415
      type: int
    ip_range:
      description: IP range of the network
      returned: always
      sample: 10.0.0.0/16
      type: str
    labels:
      description: Labels of the network
      returned: always
      type: dict
    name:
      description: Name of the network
      returned: always
      sample: awsome-network
      type: str
    routes:
      description: Routes belonging to the network
      returned: always
      type: complex
    servers:
      description: Servers attached to the network
      returned: always
      type: complex
    subnetworks:
      description: Subnetworks belonging to the network
      returned: always
      type: complex
  description: The network info as list
  returned: always
  type: complex

See also