mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Vultr: Ensure facts works when no resource exists (#43603)
Vultr API is being inconsisten in what it returns. An empty list when no resources exists, but a dict of dict when they do. The case needs to be handled so the module do not fail. An extra test has been added.
This commit is contained in:
committed by
René Moser
parent
130824c3e1
commit
68e6587748
@@ -1,6 +1,9 @@
|
||||
# Copyright (c) 2018, Yanis Guenane <yanis+ansible@guenane.org>
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
---
|
||||
- name: test gather vultr firewall group facts - empty resources
|
||||
vr_firewall_group_facts:
|
||||
|
||||
- name: Create the firewall group
|
||||
vr_firewall_group:
|
||||
name: '{{ firewall_group_name }}'
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
# Copyright (c) 2018, Yanis Guenane <yanis+ansible@guenane.org>
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
---
|
||||
- name: test gather vultr ssh key fact - empty resources
|
||||
vr_ssh_key_facts:
|
||||
|
||||
- name: Upload an ssh key
|
||||
vr_ssh_key:
|
||||
name: '{{ ssh_key_name }}'
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
# Copyright (c) 2018, Yanis Guenane <yanis+ansible@guenane.org>
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
---
|
||||
- name: test gather vultr startup script facts - empty resources
|
||||
vr_startup_script_facts:
|
||||
|
||||
- name: Create the script
|
||||
vr_startup_script:
|
||||
name: '{{ startup_script_name }}'
|
||||
|
||||
Reference in New Issue
Block a user