Automate your Hetzner Cloud instances by using a dynamic inventory script for Ansible.
See Getting Started in the repository's wiki. Here you will find always up-to-date installation instructions as well as remarks concerning the configuration and usage of the inventory script.
You are able to use the within your Ansible commands using the -i
flag.
HETZNER_CLOUD_KEY=example ansible -i hcloud-ansible-inv all -m ping
This command should execute the Ansible ping module and should return a pong for each server you are running at Hetzner Cloud. Please consult Ansible's documentation for further resources concerning the usage of Ansible itself.
- Multiple API keys for multiple projects in configuration file
(e.g.-p $project
or--project $project
)
This project is open source (MIT License). For more information see LICENSE.
This project is using the Hetzner Cloud API Client and jeffail's Gabs (painless JSON processing).