Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/andresterba/hcloud-ansible-inventory


https://github.com/andresterba/hcloud-ansible-inventory

go hcloud hetzner-cloud

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# hcloud-ansible-inventory

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

```ini
[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](https://docs.hetzner.cloud/#getting-started).

```sh
# Build
make

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