From b92ee00b9be6bcf4f425fa12dcb6fe322d8d99d4 Mon Sep 17 00:00:00 2001 From: Yokai Shogun <37459348+yokaishogun@users.noreply.github.com> Date: Wed, 8 Nov 2023 15:09:26 -0500 Subject: [PATCH] Allow volume naming without server name (#8) --- defaults/main.yml | 2 +- tasks/main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index b00f922..7fcecd7 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -20,7 +20,7 @@ hcloud__server_firewalls: hcloud__server_user_data: "" hcloud__server_volumes: [] # hcloud__server_volumes: -# - name: vol1 +# - name: "{{ inventory_hostname_short }}-vol1" # size: 10 hcloud__server_force: false diff --git a/tasks/main.yml b/tasks/main.yml index 4953988..9cb4852 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -56,7 +56,7 @@ - name: Ensure volume is created and formatted hetzner.hcloud.hcloud_volume: - name: "{{ hcloud__server_name }}-{{ item.name }}" + name: "{{ item.name }}" server: "{{ hcloud__server_name }}" automount: true format: "{{ item.format | default('ext4') }}"