2018-07-19 11:02:25 +02:00
|
|
|
# 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)
|
|
|
|
---
|
2018-08-07 20:12:36 +02:00
|
|
|
- name: test gather vultr firewall group facts - empty resources
|
2018-08-13 10:21:50 +02:00
|
|
|
vultr_firewall_group_facts:
|
2018-08-07 20:12:36 +02:00
|
|
|
|
2018-07-19 11:02:25 +02:00
|
|
|
- name: Create the firewall group
|
2018-08-13 10:21:50 +02:00
|
|
|
vultr_firewall_group:
|
2018-07-19 11:02:25 +02:00
|
|
|
name: '{{ firewall_group_name }}'
|
|
|
|
|
|
|
|
- name: test gather vultr firewall group facts in check mode
|
2018-08-13 10:21:50 +02:00
|
|
|
vultr_firewall_group_facts:
|
2018-07-19 11:02:25 +02:00
|
|
|
check_mode: yes
|
|
|
|
|
|
|
|
- name: verify test gather vultr firewall group facts in check mode
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- ansible_facts.vultr_firewall_group_facts|selectattr('description','equalto','{{ firewall_group_name }}') | list | count == 1
|
|
|
|
|
|
|
|
- name: test gather vultr firewall group facts
|
2018-08-13 10:21:50 +02:00
|
|
|
vultr_firewall_group_facts:
|
2018-07-19 11:02:25 +02:00
|
|
|
|
|
|
|
- name: verify test gather vultr firewall group facts
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- ansible_facts.vultr_firewall_group_facts|selectattr('description','equalto','{{ firewall_group_name }}') | list | count == 1
|
|
|
|
|
|
|
|
- name: Delete the firewall group
|
2018-08-13 10:21:50 +02:00
|
|
|
vultr_firewall_group:
|
2018-07-19 11:02:25 +02:00
|
|
|
name: '{{ firewall_group_name }}'
|
|
|
|
state: absent
|