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

Gather infos about your Hetzner Cloud volumes.

| "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.9.25

Description

Gather infos about your Hetzner Cloud volumes.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Gather hcloud volume infos
  hcloud_volume_info:
  register: output
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Print the gathered infos
  debug:
    var: output.hcloud_volume_info

Inputs

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

name:
    description:
    - The name of the volume 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 volume you want to get.
    type: str

Outputs

hcloud_volume_info:
  contains:
    id:
      description: Numeric identifier of the volume
      returned: always
      sample: 1937415
      type: int
    labels:
      description: User-defined labels (key-value pairs)
      returned: always
      type: dict
    location:
      description: Name of the location where the volume resides in
      returned: always
      sample: fsn1
      type: str
    name:
      description: Name of the volume
      returned: always
      sample: my-volume
      type: str
    server:
      description: Name of the server where the volume is attached to
      returned: always
      sample: my-server
      type: str
    size:
      description: Size of the volume
      returned: always
      sample: 10
      type: str
  description: The volume infos as list
  returned: always
  type: complex

See also