mirror of
https://github.com/ansible-collections/hetzner.hcloud.git
synced 2026-02-04 08:01:49 +00:00
feat: allow selecting a resource using its ID (#361)
##### SUMMARY Allow referring to resources using their IDs for: - hcloud_load_balancer_network - hcloud_load_balancer_service - hcloud_load_balancer_target - hcloud_rdns - hcloud_route - hcloud_server_network - hcloud_subnetwork ##### ISSUE TYPE - Feature Pull Request ##### COMPONENT NAME - hcloud_load_balancer_network - hcloud_load_balancer_service - hcloud_load_balancer_target - hcloud_rdns - hcloud_route - hcloud_server_network - hcloud_subnetwork
This commit is contained in:
parent
bd93d2caf8
commit
5e425c56c2
13 changed files with 101 additions and 58 deletions
|
|
@ -59,7 +59,7 @@
|
|||
assert:
|
||||
that:
|
||||
- result is failed
|
||||
- "result.msg == 'Load balancer does not exist: does-not-exist'"
|
||||
- "result.msg == 'resource (load_balancer) does not exist: does-not-exist'"
|
||||
|
||||
- name: test fail network does not exist
|
||||
hetzner.hcloud.hcloud_load_balancer_network:
|
||||
|
|
@ -72,7 +72,7 @@
|
|||
assert:
|
||||
that:
|
||||
- result is failed
|
||||
- "result.msg == 'Network does not exist: does-not-exist'"
|
||||
- "result.msg == 'resource (network) does not exist: does-not-exist'"
|
||||
|
||||
- name: test create load_balancer network with checkmode
|
||||
hetzner.hcloud.hcloud_load_balancer_network:
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
assert:
|
||||
that:
|
||||
- result is failed
|
||||
- "result.msg == 'Load balancer does not exist: does-not-exist'"
|
||||
- "result.msg == 'resource (load_balancer) does not exist: does-not-exist'"
|
||||
|
||||
- name: test create load_balancer service with checkmode
|
||||
hetzner.hcloud.hcloud_load_balancer_service:
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
assert:
|
||||
that:
|
||||
- result is failed
|
||||
- "result.msg == 'Load balancer does not exist: does-not-exist'"
|
||||
- "result.msg == 'resource (load_balancer) does not exist: does-not-exist'"
|
||||
|
||||
- name: test fail server does not exist
|
||||
hetzner.hcloud.hcloud_load_balancer_target:
|
||||
|
|
@ -50,7 +50,7 @@
|
|||
assert:
|
||||
that:
|
||||
- result is failed
|
||||
- "result.msg == 'Server not found: does-not-exist'"
|
||||
- "result.msg == 'resource (server) does not exist: does-not-exist'"
|
||||
|
||||
- name: test create load_balancer target with checkmode
|
||||
hetzner.hcloud.hcloud_load_balancer_target:
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@
|
|||
assert:
|
||||
that:
|
||||
- result is failed
|
||||
- 'result.msg == "The selected server does not exist"'
|
||||
- 'result.msg == "resource (server) does not exist: not-existing"'
|
||||
- name: test create rdns
|
||||
hetzner.hcloud.hcloud_rdns:
|
||||
server: "{{ hcloud_server_name }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue