mirror of
https://github.com/ansible-collections/hetzner.hcloud.git
synced 2026-02-04 08:01:49 +00:00
feat: query floating ip info by name (#303)
##### SUMMARY Fixes #302 The feature was missing, this make the floating_ip_info module consistent with what is expected to be implemented. ##### ISSUE TYPE - Feature Pull Request ##### COMPONENT NAME floating_ip_info
This commit is contained in:
parent
8b24cf2522
commit
4bb2bb80fa
3 changed files with 25 additions and 16 deletions
|
|
@ -37,23 +37,23 @@
|
|||
that:
|
||||
- result is failed
|
||||
|
||||
# - name: Gather hcloud_floating_ip_info with correct name
|
||||
# hetzner.hcloud.hcloud_floating_ip_info:
|
||||
# name: "{{ hcloud_floating_ip_name }}"
|
||||
# register: result
|
||||
# - name: Verify hcloud_floating_ip_info with correct name
|
||||
# ansible.builtin.assert:
|
||||
# that:
|
||||
# - result.hcloud_floating_ip_info | list | count == 1
|
||||
- name: Gather hcloud_floating_ip_info with correct name
|
||||
hetzner.hcloud.hcloud_floating_ip_info:
|
||||
name: "{{ hcloud_floating_ip_name }}"
|
||||
register: result
|
||||
- name: Verify hcloud_floating_ip_info with correct name
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- result.hcloud_floating_ip_info | list | count == 1
|
||||
|
||||
# - name: Gather hcloud_floating_ip_info with wrong name
|
||||
# hetzner.hcloud.hcloud_floating_ip_info:
|
||||
# name: "{{ hcloud_floating_ip_name }}-invalid"
|
||||
# register: result
|
||||
# - name: Verify hcloud_floating_ip_info with wrong name
|
||||
# ansible.builtin.assert:
|
||||
# that:
|
||||
# - result.hcloud_floating_ip_info | list | count == 0
|
||||
- name: Gather hcloud_floating_ip_info with wrong name
|
||||
hetzner.hcloud.hcloud_floating_ip_info:
|
||||
name: "{{ hcloud_floating_ip_name }}-invalid"
|
||||
register: result
|
||||
- name: Verify hcloud_floating_ip_info with wrong name
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- result.hcloud_floating_ip_info | list | count == 0
|
||||
|
||||
- name: Gather hcloud_floating_ip_info with correct label selector
|
||||
hetzner.hcloud.hcloud_floating_ip_info:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue