From 00a4fdd58aba74ab7e8e1a26ff59beea452c2add Mon Sep 17 00:00:00 2001 From: Jonas L Date: Thu, 4 Apr 2024 16:53:32 +0200 Subject: [PATCH] fix: use empty string to remove server from its placement group (#489) ##### SUMMARY - Do not remove the server from its placement group when the `placement_group` argument is not specified. - Pass an empty string to the `placement_group` argument to remove a server from its placement group. --- changelogs/fragments/server-empty-string-arguments.yml | 3 +++ tests/integration/targets/placement_group/tasks/test.yml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/server-empty-string-arguments.yml diff --git a/changelogs/fragments/server-empty-string-arguments.yml b/changelogs/fragments/server-empty-string-arguments.yml new file mode 100644 index 00000000..4b82edbe --- /dev/null +++ b/changelogs/fragments/server-empty-string-arguments.yml @@ -0,0 +1,3 @@ +bugfixes: + - server - Do not remove the server from its placement group when the `placement_group` argument is not specified. + - server - Pass an empty string to the `placement_group` argument to remove a server from its placement group. diff --git a/tests/integration/targets/placement_group/tasks/test.yml b/tests/integration/targets/placement_group/tasks/test.yml index 3694c846..d988275d 100644 --- a/tests/integration/targets/placement_group/tasks/test.yml +++ b/tests/integration/targets/placement_group/tasks/test.yml @@ -80,7 +80,7 @@ - name: test remove server from placement group hetzner.hcloud.server: name: "{{ hcloud_server_name }}" - placement_group: null + placement_group: "" state: present register: result - name: verify remove server from placement group