hetzner_cloud/README.md
2023-06-12 17:29:18 +02:00

18 lines
736 B
Markdown

# Hetzner Playbooks
This playbooks use [the hetzner cloud ansible collection](https://docs.ansible.com/ansible/latest/collections/hetzner/hcloud/index.html) to create and manage Hetzner VMs.
## hetzner_basic.yml
This playbook uses an [hetzner API key](https://docs.hetzner.com/cloud/api/getting-started/generating-api-token/) to create a simple cx11 server named "Squi". The server is located in Falkenstein and is configured using cloud-config. The goal is to have a simple example playbook.
The API key is encrypted using ansible-vault. Such an encrypted string can be obtained via:
```
ansible-vault encrypt_string "My_string"
```
It can then simply be launched with:
```
ansible-playbook --ask-vault-pass hetzner_basic.yml
```