https://github.com/andresterba/hcloud-ansible-inventory
https://github.com/andresterba/hcloud-ansible-inventory
go hcloud hetzner-cloud
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/andresterba/hcloud-ansible-inventory
- Owner: andresterba
- License: mit
- Created: 2020-10-22T10:33:00.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-03-22T07:58:48.000Z (about 1 year ago)
- Last Synced: 2025-05-01T23:35:45.973Z (about 1 year ago)
- Topics: go, hcloud, hetzner-cloud
- Language: Go
- Homepage:
- Size: 82 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - andresterba/hcloud-ansible-inventory - (go)
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
```