From e4512d87333c8b4d78fdeb9189a40d61982bb2d5 Mon Sep 17 00:00:00 2001 From: Florian Weber <706419+fnwbr@users.noreply.github.com> Date: Tue, 13 Jan 2026 14:22:04 +0100 Subject: [PATCH] docs: add note that server.user_data is used by cloud-init (#786) ##### SUMMARY I was looking for "cloud" or "cloud-init" within the documentation without any luck. Maybe this will help someone else finding the appropriate option. ##### ISSUE TYPE - Docs Pull Request ##### COMPONENT NAME `hetzner.hcloud.server` --------- Co-authored-by: Jonas L. --- plugins/modules/server.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugins/modules/server.py b/plugins/modules/server.py index 4ff1853..f6d4b90 100644 --- a/plugins/modules/server.py +++ b/plugins/modules/server.py @@ -125,6 +125,7 @@ options: user_data: description: - User Data to be passed to the server on creation. + - C(cloud-init), C(ignition) or similar provisioning tools may retrieve user configuration from the Server's C(user_data). - Only used during the server creation. type: str rescue_mode: @@ -178,6 +179,16 @@ EXAMPLES = """ - me@myorganisation state: present +- name: Create a basic server with additional cloud-init data disabling SSH password authentication + hetzner.hcloud.server: + name: my-server + server_type: cpx22 + image: ubuntu-22.04 + user_data: | + #cloud-config + ssh_pwauth: false + state: present + - name: Resize an existing server hetzner.hcloud.server: name: my-server