1
0
Fork 0
mirror of https://github.com/ansible-collections/hetzner.hcloud.git synced 2026-02-04 08:01:49 +00:00

test: create server with datacenter

This commit is contained in:
jo 2025-12-19 19:19:38 +01:00
parent 7b292afe0b
commit 4192dce2c2
No known key found for this signature in database
GPG key ID: B2FEC9B22722B984
2 changed files with 21 additions and 0 deletions

View file

@ -3,6 +3,7 @@
---
#- ansible.builtin.include_tasks: test_validation.yml
- ansible.builtin.include_tasks: test_basic.yml
- ansible.builtin.include_tasks: test_datacenter.yml
#- ansible.builtin.include_tasks: test_firewalls.yml
- ansible.builtin.include_tasks: test_primary_ips.yml
- ansible.builtin.include_tasks: test_private_network_only.yml

View file

@ -0,0 +1,20 @@
# 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)
---
- name: Test create server with datacenter (deprecated)
hetzner.hcloud.server:
name: "{{ hcloud_server_name }}"
server_type: "{{ hcloud_server_type_name }}"
image: "{{ hcloud_image_name }}"
datacenter: "{{ hcloud_datacenter_name }}"
state: created
register: result
- name: Verify create server with datacenter (deprecated)
ansible.builtin.assert:
that:
- result is changed
- name: Cleanup server with datacenter (deprecated)
hetzner.hcloud.server:
name: "{{ hcloud_server_name }}"
state: absent