blob: d11c23132237725e13bb2925c39117517bccec28 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
---
- name: setup zone is present
cs_zone:
name: "{{ cs_resource_prefix }}-zone"
dns1: 8.8.8.8
dns2: 8.8.4.4
network_type: basic
register: zone
- name: verify setup zone is present
assert:
that:
- zone|success
- name: get facts from zone in check mode
cs_zone_facts:
name: "{{ cs_resource_prefix }}-zone"
register: zone
check_mode: true
- name: verify get facts from zone in check mode
assert:
that:
- zone|success
- not zone|changed
- ansible_facts.cloudstack_zone.dns1 == "8.8.8.8"
- ansible_facts.cloudstack_zone.dns2 == "8.8.4.4"
- ansible_facts.cloudstack_zone.internal_dns1 == "8.8.8.8"
- ansible_facts.cloudstack_zone.internal_dns2 == "8.8.4.4"
- ansible_facts.cloudstack_zone.local_storage_enabled == false
- ansible_facts.cloudstack_zone.network_type == "Basic"
- ansible_facts.cloudstack_zone.zone_token != ""
- ansible_facts.cloudstack_zone.securitygroups_enabled == true
- ansible_facts.cloudstack_zone.dhcp_provider == "VirtualRouter"
- ansible_facts.cloudstack_zone.local_storage_enabled == false
- name: get facts from zone
cs_zone_facts:
name: "{{ cs_resource_prefix }}-zone"
register: zone
- name: verify get facts from zone
assert:
that:
- zone|success
- not zone|changed
- ansible_facts.cloudstack_zone.dns1 == "8.8.8.8"
- ansible_facts.cloudstack_zone.dns2 == "8.8.4.4"
- ansible_facts.cloudstack_zone.internal_dns1 == "8.8.8.8"
- ansible_facts.cloudstack_zone.internal_dns2 == "8.8.4.4"
- ansible_facts.cloudstack_zone.local_storage_enabled == false
- ansible_facts.cloudstack_zone.network_type == "Basic"
- ansible_facts.cloudstack_zone.zone_token != ""
- ansible_facts.cloudstack_zone.securitygroups_enabled == true
- ansible_facts.cloudstack_zone.dhcp_provider == "VirtualRouter"
- ansible_facts.cloudstack_zone.local_storage_enabled == false
|