Skip to content

andresterba/hcloud-ansible-inventory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hcloud-ansible-inventory

This script generates a inventory in the INI format. It will look like this:

[hetzner]
server-1 ansible_host=server1.example.com ansible_user=root
server-2 ansible_host=server2.example.com ansible_user=root
server-3 ansible_host=server3.example.com ansible_user=root

Usage

You have to set the enviroment variabel HETZNER_CLOUD_API_KEY with your Hetzner API token.

# Build
make

# Run
HETZNER_CLOUD_API_KEY=ABCDE1337 ./hcloud-ansible-inventory --inventory-file my-inventory.yaml