mirror of
https://github.com/ansible-collections/hetzner.hcloud
synced 2024-09-20 06:22:11 +00:00
test: clean ressources before testing (#228)
This commit is contained in:
parent
584e904c29
commit
97c84e93a4
2 changed files with 20 additions and 1 deletions
|
@ -1,6 +1,21 @@
|
||||||
# Copyright: (c) 2019, Hetzner Cloud GmbH <info@hetzner-cloud.de>
|
# Copyright: (c) 2019, Hetzner Cloud GmbH <info@hetzner-cloud.de>
|
||||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# 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
|
- name: setup server
|
||||||
hcloud_server:
|
hcloud_server:
|
||||||
name: "{{ hcloud_server_name }}"
|
name: "{{ hcloud_server_name }}"
|
||||||
|
@ -62,7 +77,6 @@
|
||||||
- result is failed
|
- result is failed
|
||||||
- 'result.msg == "one of the following is required: id, name"'
|
- 'result.msg == "one of the following is required: id, name"'
|
||||||
|
|
||||||
|
|
||||||
- name: test invalid type
|
- name: test invalid type
|
||||||
hcloud_floating_ip:
|
hcloud_floating_ip:
|
||||||
name: "{{ hcloud_floating_ip_name }}"
|
name: "{{ hcloud_floating_ip_name }}"
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
# Copyright: (c) 2019, Hetzner Cloud GmbH <info@hetzner-cloud.de>
|
# Copyright: (c) 2019, Hetzner Cloud GmbH <info@hetzner-cloud.de>
|
||||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# 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
|
- name: test create Primary IP with check mode
|
||||||
hcloud_primary_ip:
|
hcloud_primary_ip:
|
||||||
name: "{{ hcloud_primary_ip_name }}"
|
name: "{{ hcloud_primary_ip_name }}"
|
||||||
|
|
Loading…
Reference in a new issue