1
0
Fork 0
mirror of https://github.com/ansible-collections/hetzner.hcloud.git synced 2026-02-04 08:01:49 +00:00
hetzner.hcloud/examples/use-module-defaults-group.yml
Julian Tölle 35da4fa8df
docs: update deprecated server types
The CX Gen 2 and CPX Gen 1 types are deprecated and will be removed
from the API at the end of the year. This replaces all usages in our
docs, so users do not have to figure it out themselves.
2025-10-28 13:27:11 +01:00

27 lines
674 B
YAML

---
- name: Demonstrate the usage of the 'hetzner.hcloud.all' module_defaults group
hosts: localhost
connection: local
module_defaults:
group/hetzner.hcloud.all:
api_token: LRK9DAWQ1ZAEFSrCNEEzLCUwhYX1U3g7wMg4dTlkkDC96fyDuyJ39nVbVjCKSDfj
tasks:
- name: Create a volume
hetzner.hcloud.volume:
name: my-volume
location: hel1
size: 100
state: present
register: volume
- name: Create a server
hetzner.hcloud.server:
name: my-server
server_type: cpx22
image: debian-12
location: fsn1
volumes:
- "{{ volume.hcloud_volume.id }}"
state: present