From a7439570cc89f34adc37aad242225950c066e2f4 Mon Sep 17 00:00:00 2001 From: Florian Weber <706419+fnwbr@users.noreply.github.com> Date: Mon, 12 Jan 2026 18:14:43 +0100 Subject: [PATCH] Add example: Create server with cloud-init Added cloud-init data to disable SSH password authentication. --- plugins/modules/server.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/modules/server.py b/plugins/modules/server.py index 416b77f..57eb91e 100644 --- a/plugins/modules/server.py +++ b/plugins/modules/server.py @@ -178,6 +178,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