ansible.builtin.hcloud_location_facts (v2.8.17) — module

Gather facts about your Hetzner Cloud locations.

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

Authors: Lukas Kaemmerling (@lkaemmerling)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.8.17

Description

Gather facts about your Hetzner Cloud locations.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Gather hcloud location facts
  local_action:
    module: hcloud_location_facts
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Print the gathered facts
  debug:
    var: ansible_facts.hcloud_location_facts

Inputs

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

name:
    description:
    - The name of the location 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.
    - You can also set this option by using the environment variable HCLOUD_TOKEN
    required: true
    type: str

Outputs

hcloud_location_facts:
  contains:
    city:
      description: City of the location
      returned: always
      sample: Falkenstein
      type: str
    country:
      description: Country code of the location
      returned: always
      sample: DE
      type: str
    description:
      description: Detail description of the location
      returned: always
      sample: Falkenstein DC Park 1
      type: str
    id:
      description: Numeric identifier of the location
      returned: always
      sample: 1937415
      type: int
    name:
      description: Name of the location
      returned: always
      sample: fsn1
      type: str
  description: The location facts as list
  returned: always
  type: complex

See also