1
0
Fork 0
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:
Jonas L 2023-08-17 11:50:19 +02:00 committed by GitHub
parent 8b24cf2522
commit 4bb2bb80fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 16 deletions

View file

@ -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: