mirror of
https://github.com/ansible-collections/hetzner.hcloud
synced 2024-11-12 23:37:15 +00:00
test: use shared network zone variable (#543)
##### SUMMARY Allow to easily update the network zone when changing the location, for testing.
This commit is contained in:
parent
c6d7121e9e
commit
87ad95a0ad
43 changed files with 90 additions and 21 deletions
|
@ -22,3 +22,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
hetzner.hcloud.load_balancer:
|
hetzner.hcloud.load_balancer:
|
||||||
name: "{{ hcloud_load_balancer_name }}"
|
name: "{{ hcloud_load_balancer_name }}"
|
||||||
load_balancer_type: lb11
|
load_balancer_type: lb11
|
||||||
network_zone: eu-central
|
network_zone: "{{ hcloud_network_zone_name }}"
|
||||||
state: present
|
state: present
|
||||||
check_mode: true
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
hetzner.hcloud.load_balancer:
|
hetzner.hcloud.load_balancer:
|
||||||
name: "{{ hcloud_load_balancer_name }}"
|
name: "{{ hcloud_load_balancer_name }}"
|
||||||
load_balancer_type: lb11
|
load_balancer_type: lb11
|
||||||
network_zone: eu-central
|
network_zone: "{{ hcloud_network_zone_name }}"
|
||||||
labels:
|
labels:
|
||||||
key: value
|
key: value
|
||||||
label: value123
|
label: value123
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
hetzner.hcloud.load_balancer:
|
hetzner.hcloud.load_balancer:
|
||||||
name: "{{ hcloud_load_balancer_name }}"
|
name: "{{ hcloud_load_balancer_name }}"
|
||||||
load_balancer_type: lb11
|
load_balancer_type: lb11
|
||||||
network_zone: eu-central
|
network_zone: "{{ hcloud_network_zone_name }}"
|
||||||
state: present
|
state: present
|
||||||
register: result
|
register: result
|
||||||
- name: Verify create idempotency
|
- name: Verify create idempotency
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
hetzner.hcloud.load_balancer:
|
hetzner.hcloud.load_balancer:
|
||||||
name: "{{ hcloud_load_balancer_name }}"
|
name: "{{ hcloud_load_balancer_name }}"
|
||||||
load_balancer_type: lb11
|
load_balancer_type: lb11
|
||||||
network_zone: eu-central
|
network_zone: "{{ hcloud_network_zone_name }}"
|
||||||
labels:
|
labels:
|
||||||
key: value
|
key: value
|
||||||
register: test_load_balancer
|
register: test_load_balancer
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
network: "{{ hcloud_network_name }}"
|
network: "{{ hcloud_network_name }}"
|
||||||
ip_range: "10.0.0.0/16"
|
ip_range: "10.0.0.0/16"
|
||||||
type: "cloud"
|
type: "cloud"
|
||||||
network_zone: "eu-central"
|
network_zone: "{{ hcloud_network_zone_name }}"
|
||||||
state: present
|
state: present
|
||||||
register: subnetwork
|
register: subnetwork
|
||||||
- name: verify subnetwork
|
- name: verify subnetwork
|
||||||
|
@ -162,7 +162,7 @@
|
||||||
network: "{{ hcloud_network_name }}"
|
network: "{{ hcloud_network_name }}"
|
||||||
ip_range: "10.0.0.0/16"
|
ip_range: "10.0.0.0/16"
|
||||||
type: "cloud"
|
type: "cloud"
|
||||||
network_zone: "eu-central"
|
network_zone: "{{ hcloud_network_zone_name }}"
|
||||||
state: absent
|
state: absent
|
||||||
register: result
|
register: result
|
||||||
- name: verify cleanup subnetwork
|
- name: verify cleanup subnetwork
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
hetzner.hcloud.subnetwork:
|
hetzner.hcloud.subnetwork:
|
||||||
network: "{{ hcloud_network_name }}"
|
network: "{{ hcloud_network_name }}"
|
||||||
type: server
|
type: server
|
||||||
network_zone: eu-central
|
network_zone: "{{ hcloud_network_zone_name }}"
|
||||||
ip_range: 10.0.1.0/24
|
ip_range: 10.0.1.0/24
|
||||||
register: test_subnetwork
|
register: test_subnetwork
|
||||||
|
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -28,6 +28,6 @@
|
||||||
hetzner.hcloud.load_balancer:
|
hetzner.hcloud.load_balancer:
|
||||||
name: "{{ hcloud_load_balancer_name }}"
|
name: "{{ hcloud_load_balancer_name }}"
|
||||||
load_balancer_type: lb11
|
load_balancer_type: lb11
|
||||||
network_zone: eu-central
|
network_zone: "{{ hcloud_network_zone_name }}"
|
||||||
state: present
|
state: present
|
||||||
register: test_load_balancer
|
register: test_load_balancer
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -468,6 +468,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is success
|
- result is success
|
||||||
|
|
||||||
- name: test create server with labels
|
- name: test create server with labels
|
||||||
hetzner.hcloud.server:
|
hetzner.hcloud.server:
|
||||||
name: "{{ hcloud_server_name}}"
|
name: "{{ hcloud_server_name}}"
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
hetzner.hcloud.subnetwork:
|
hetzner.hcloud.subnetwork:
|
||||||
network: "{{ hcloud_network_name }}-1"
|
network: "{{ hcloud_network_name }}-1"
|
||||||
ip_range: 192.168.0.0/24
|
ip_range: 192.168.0.0/24
|
||||||
network_zone: eu-central
|
network_zone: "{{ hcloud_network_zone_name }}"
|
||||||
type: cloud
|
type: cloud
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
hetzner.hcloud.subnetwork:
|
hetzner.hcloud.subnetwork:
|
||||||
network: "{{ hcloud_network_name }}-1"
|
network: "{{ hcloud_network_name }}-1"
|
||||||
ip_range: 192.168.1.0/24
|
ip_range: 192.168.1.0/24
|
||||||
network_zone: eu-central
|
network_zone: "{{ hcloud_network_zone_name }}"
|
||||||
type: cloud
|
type: cloud
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
hetzner.hcloud.subnetwork:
|
hetzner.hcloud.subnetwork:
|
||||||
network: "{{ hcloud_network_name }}-2"
|
network: "{{ hcloud_network_name }}-2"
|
||||||
ip_range: 192.168.2.0/24
|
ip_range: 192.168.2.0/24
|
||||||
network_zone: eu-central
|
network_zone: "{{ hcloud_network_zone_name }}"
|
||||||
type: cloud
|
type: cloud
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
hetzner.hcloud.subnetwork:
|
hetzner.hcloud.subnetwork:
|
||||||
network: "{{ hcloud_network_name }}-2"
|
network: "{{ hcloud_network_name }}-2"
|
||||||
ip_range: 192.168.3.0/24
|
ip_range: 192.168.3.0/24
|
||||||
network_zone: eu-central
|
network_zone: "{{ hcloud_network_zone_name }}"
|
||||||
type: cloud
|
type: cloud
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
hetzner.hcloud.subnetwork:
|
hetzner.hcloud.subnetwork:
|
||||||
network: "{{ hcloud_network_name }}"
|
network: "{{ hcloud_network_name }}"
|
||||||
type: server
|
type: server
|
||||||
network_zone: eu-central
|
network_zone: "{{ hcloud_network_zone_name }}"
|
||||||
ip_range: 10.0.1.0/24
|
ip_range: 10.0.1.0/24
|
||||||
register: test_subnetwork
|
register: test_subnetwork
|
||||||
|
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
- name: Test create with checkmode
|
- name: Test create with checkmode
|
||||||
hetzner.hcloud.subnetwork:
|
hetzner.hcloud.subnetwork:
|
||||||
network: "{{ hcloud_network_name }}"
|
network: "{{ hcloud_network_name }}"
|
||||||
network_zone: eu-central
|
network_zone: "{{ hcloud_network_zone_name }}"
|
||||||
type: cloud
|
type: cloud
|
||||||
ip_range: 10.0.0.0/24
|
ip_range: 10.0.0.0/24
|
||||||
state: present
|
state: present
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
- name: Test create
|
- name: Test create
|
||||||
hetzner.hcloud.subnetwork:
|
hetzner.hcloud.subnetwork:
|
||||||
network: "{{ hcloud_network_name }}"
|
network: "{{ hcloud_network_name }}"
|
||||||
network_zone: eu-central
|
network_zone: "{{ hcloud_network_zone_name }}"
|
||||||
type: cloud
|
type: cloud
|
||||||
ip_range: 10.0.0.0/24
|
ip_range: 10.0.0.0/24
|
||||||
state: present
|
state: present
|
||||||
|
@ -40,14 +40,14 @@
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
- result.hcloud_subnetwork.network == hcloud_network_name
|
- result.hcloud_subnetwork.network == hcloud_network_name
|
||||||
- result.hcloud_subnetwork.network_zone == "eu-central"
|
- result.hcloud_subnetwork.network_zone == hcloud_network_zone_name
|
||||||
- result.hcloud_subnetwork.type == "cloud"
|
- result.hcloud_subnetwork.type == "cloud"
|
||||||
- result.hcloud_subnetwork.ip_range == "10.0.0.0/24"
|
- result.hcloud_subnetwork.ip_range == "10.0.0.0/24"
|
||||||
|
|
||||||
- name: Test create idempotency
|
- name: Test create idempotency
|
||||||
hetzner.hcloud.subnetwork:
|
hetzner.hcloud.subnetwork:
|
||||||
network: "{{ hcloud_network_name }}"
|
network: "{{ hcloud_network_name }}"
|
||||||
network_zone: eu-central
|
network_zone: "{{ hcloud_network_zone_name }}"
|
||||||
type: cloud
|
type: cloud
|
||||||
ip_range: 10.0.0.0/24
|
ip_range: 10.0.0.0/24
|
||||||
state: present
|
state: present
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
- name: Test delete
|
- name: Test delete
|
||||||
hetzner.hcloud.subnetwork:
|
hetzner.hcloud.subnetwork:
|
||||||
network: "{{ hcloud_network_name }}"
|
network: "{{ hcloud_network_name }}"
|
||||||
network_zone: eu-central
|
network_zone: "{{ hcloud_network_zone_name }}"
|
||||||
type: cloud
|
type: cloud
|
||||||
ip_range: 10.0.0.0/24
|
ip_range: 10.0.0.0/24
|
||||||
state: absent
|
state: absent
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
- name: Test create with vswitch
|
- name: Test create with vswitch
|
||||||
hetzner.hcloud.subnetwork:
|
hetzner.hcloud.subnetwork:
|
||||||
network: "{{ hcloud_network_name }}"
|
network: "{{ hcloud_network_name }}"
|
||||||
network_zone: eu-central
|
network_zone: "{{ hcloud_network_zone_name }}"
|
||||||
type: vswitch
|
type: vswitch
|
||||||
ip_range: 10.0.1.0/24
|
ip_range: 10.0.1.0/24
|
||||||
vswitch_id: "{{ test_vswitch_id }}"
|
vswitch_id: "{{ test_vswitch_id }}"
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
- result.hcloud_subnetwork.network == hcloud_network_name
|
- result.hcloud_subnetwork.network == hcloud_network_name
|
||||||
- result.hcloud_subnetwork.network_zone == "eu-central"
|
- result.hcloud_subnetwork.network_zone == hcloud_network_zone_name
|
||||||
- result.hcloud_subnetwork.type == "vswitch"
|
- result.hcloud_subnetwork.type == "vswitch"
|
||||||
- result.hcloud_subnetwork.ip_range == "10.0.1.0/24"
|
- result.hcloud_subnetwork.ip_range == "10.0.1.0/24"
|
||||||
- result.hcloud_subnetwork.vswitch_id | string == test_vswitch_id
|
- result.hcloud_subnetwork.vswitch_id | string == test_vswitch_id
|
||||||
|
@ -92,7 +92,7 @@
|
||||||
- name: Test delete with vswitch
|
- name: Test delete with vswitch
|
||||||
hetzner.hcloud.subnetwork:
|
hetzner.hcloud.subnetwork:
|
||||||
network: "{{ hcloud_network_name }}"
|
network: "{{ hcloud_network_name }}"
|
||||||
network_zone: eu-central
|
network_zone: "{{ hcloud_network_zone_name }}"
|
||||||
type: vswitch
|
type: vswitch
|
||||||
ip_range: 10.0.1.0/24
|
ip_range: 10.0.1.0/24
|
||||||
state: absent
|
state: absent
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
|
@ -25,3 +25,5 @@ hcloud_location_name: hel1
|
||||||
hcloud_location_id: 3
|
hcloud_location_id: 3
|
||||||
hcloud_datacenter_name: hel1-dc2
|
hcloud_datacenter_name: hel1-dc2
|
||||||
hcloud_datacenter_id: 3
|
hcloud_datacenter_id: 3
|
||||||
|
|
||||||
|
hcloud_network_zone_name: eu-central
|
||||||
|
|
Loading…
Reference in a new issue