You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/vultr_network_info/tasks/main.yml

36 lines
1.0 KiB
YAML

# 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 network info - empty resources
vultr_network_info:
- name: Create the network
vultr_network:
name: '{{ vultr_network_name }}'
cidr: '{{ vultr_network_cidr }}'
region: '{{ vultr_network_region }}'
- name: test gather vultr network info in check mode
vultr_network_info:
check_mode: yes
register: result
- name: verify test gather vultr network info in check mode
assert:
that:
- result.vultr_network_info|selectattr('name','equalto','{{ vultr_network_name }}') | list | count == 1
- name: test gather vultr network info
vultr_network_info:
register: result
- name: verify test gather vultr network info
assert:
that:
- result.vultr_network_info|selectattr('name','equalto','{{ vultr_network_name }}') | list | count == 1
- name: Delete the script
vultr_network:
name: '{{ vultr_network_name }}'
state: absent