hetzner.hcloud.hcloud – Ansible dynamic inventory plugin for the Hetzner Cloud.¶
Note
This plugin is part of the hetzner.hcloud collection (version 1.4.2).
To install it use: ansible-galaxy collection install hetzner.hcloud
.
To use it in a playbook, specify: hetzner.hcloud.hcloud
.
Synopsis¶
Reads inventories from the Hetzner Cloud API.
Uses a YAML configuration file that ends with hcloud.(yml|yaml).
Requirements¶
The below requirements are needed on the local controller node that executes this inventory.
python >= 2.7
hcloud-python >= 1.0.0
Parameters¶
Examples¶
# Minimal example. `HCLOUD_TOKEN` is exposed in environment.
plugin: hcloud
# Example with locations, types, groups and token
plugin: hcloud
token: foobar
locations:
- nbg1
types:
- cx11
# Group by a location with prefix e.g. "hcloud_location_nbg1"
# and image_os_flavor without prefix and separator e.g. "ubuntu"
# and status with prefix e.g. "server_status_running"
plugin: hcloud
keyed_groups:
- key: location
prefix: hcloud_location
- key: image_os_flavor
separator: ""
- key: status
prefix: server_status
Authors¶
Lukas Kaemmerling (@lkaemmerling)