cs_zone_facts: implement return facts as ansible returns (#36993)

This commit is contained in:
René Moser 2018-03-05 11:42:38 +01:00 committed by GitHub
commit 6578403288
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 75 additions and 54 deletions

View file

@ -15,12 +15,23 @@
cs_zone_facts:
name: "{{ cs_resource_prefix }}-zone"
register: zone
check_mode: true
check_mode: yes
- name: verify get facts from zone in check mode
assert:
that:
- zone is successful
- zone is not changed
- zone.dns1 == "8.8.8.8"
- zone.dns2 == "8.8.4.4"
- zone.internal_dns1 == "8.8.8.8"
- zone.internal_dns2 == "8.8.4.4"
- zone.local_storage_enabled == false
- zone.network_type == "Basic"
- zone.zone_token != ""
- zone.securitygroups_enabled == true
- zone.dhcp_provider == "VirtualRouter"
- zone.local_storage_enabled == false
# Ansible Facts
- cloudstack_zone.dns1 == "8.8.8.8"
- cloudstack_zone.dns2 == "8.8.4.4"
- cloudstack_zone.internal_dns1 == "8.8.8.8"
@ -41,6 +52,17 @@
that:
- zone is successful
- zone is not changed
- zone.dns1 == "8.8.8.8"
- zone.dns2 == "8.8.4.4"
- zone.internal_dns1 == "8.8.8.8"
- zone.internal_dns2 == "8.8.4.4"
- zone.local_storage_enabled == false
- zone.network_type == "Basic"
- zone.zone_token != ""
- zone.securitygroups_enabled == true
- zone.dhcp_provider == "VirtualRouter"
- zone.local_storage_enabled == false
# Ansible Facts
- cloudstack_zone.dns1 == "8.8.8.8"
- cloudstack_zone.dns2 == "8.8.4.4"
- cloudstack_zone.internal_dns1 == "8.8.8.8"