diff --git a/tests/integration/targets/hcloud_floating_ip/tasks/main.yml b/tests/integration/targets/hcloud_floating_ip/tasks/main.yml index 02e2036..00837a2 100644 --- a/tests/integration/targets/hcloud_floating_ip/tasks/main.yml +++ b/tests/integration/targets/hcloud_floating_ip/tasks/main.yml @@ -1,6 +1,21 @@ # Copyright: (c) 2019, Hetzner Cloud GmbH # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) --- +- name: setup ensure server is absent + hcloud_server: + name: "{{ hcloud_server_name }}" + state: absent + +- name: setup ensure another server is absent + hcloud_server: + name: "{{ hcloud_server_name }}2" + state: absent + +- name: setup ensure floating ip is absent + hcloud_floating_ip: + name: "{{ hcloud_floating_ip_name }}" + state: absent + - name: setup server hcloud_server: name: "{{ hcloud_server_name }}" @@ -62,7 +77,6 @@ - result is failed - 'result.msg == "one of the following is required: id, name"' - - name: test invalid type hcloud_floating_ip: name: "{{ hcloud_floating_ip_name }}" diff --git a/tests/integration/targets/hcloud_primary_ip/tasks/main.yml b/tests/integration/targets/hcloud_primary_ip/tasks/main.yml index d4efc60..a01a18c 100644 --- a/tests/integration/targets/hcloud_primary_ip/tasks/main.yml +++ b/tests/integration/targets/hcloud_primary_ip/tasks/main.yml @@ -1,6 +1,11 @@ # Copyright: (c) 2019, Hetzner Cloud GmbH # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) --- +- name: setup ensure primary ip is absent + hcloud_primary_ip: + name: "{{ hcloud_primary_ip_name }}" + state: absent + - name: test create Primary IP with check mode hcloud_primary_ip: name: "{{ hcloud_primary_ip_name }}"