summaryrefslogtreecommitdiff
path: root/test/integration/targets/gcp_dns_managed_zone/tasks/main.yml
diff options
context:
space:
mode:
authorAlex Stephen <alexstephen@google.com>2018-02-06 08:50:16 -0800
committerRyan Brown <sb@ryansb.com>2018-02-06 11:50:16 -0500
commit9706abf68518dc0f663f23f64475f2b270851ae4 (patch)
treec3bfe174a00cb9219bb2b8310b865e0a52301da4 /test/integration/targets/gcp_dns_managed_zone/tasks/main.yml
parenta5b80464df92c2ebdc7ca73159763d10d4ed7068 (diff)
downloadansible-9706abf68518dc0f663f23f64475f2b270851ae4.tar.gz
[cloud] New GCP module: DNS Managed Zones (gcp_dns_managed_zone.py) (#35014)
Diffstat (limited to 'test/integration/targets/gcp_dns_managed_zone/tasks/main.yml')
-rw-r--r--test/integration/targets/gcp_dns_managed_zone/tasks/main.yml86
1 files changed, 86 insertions, 0 deletions
diff --git a/test/integration/targets/gcp_dns_managed_zone/tasks/main.yml b/test/integration/targets/gcp_dns_managed_zone/tasks/main.yml
new file mode 100644
index 0000000000..e6ec5669f4
--- /dev/null
+++ b/test/integration/targets/gcp_dns_managed_zone/tasks/main.yml
@@ -0,0 +1,86 @@
+---
+# ----------------------------------------------------------------------------
+#
+# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
+#
+# ----------------------------------------------------------------------------
+#
+# This file is automatically generated by Magic Modules and manual
+# changes will be clobbered when the file is regenerated.
+#
+# Please read more about how to change this file at
+# https://www.github.com/GoogleCloudPlatform/magic-modules
+#
+# ----------------------------------------------------------------------------
+#----------------------------------------------------------
+- name: create a managed zone
+ gcp_dns_managed_zone:
+ name: "{{ resource_name }}"
+ dns_name: test.somewild2.example.com.
+ description: 'test zone'
+ project: "{{ gcp_project }}"
+ auth_kind: "{{ gcp_cred_kind }}"
+ service_account_file: "{{ gcp_cred_file }}"
+ scopes:
+ - https://www.googleapis.com/auth/ndev.clouddns.readwrite
+ state: present
+ register: result
+- name: assert changed is true
+ assert:
+ that:
+ - result.changed == true
+ - "result.kind == 'dns#managedZone'"
+# ----------------------------------------------------------------------------
+- name: create a managed zone that already exists
+ gcp_dns_managed_zone:
+ name: "{{ resource_name }}"
+ dns_name: test.somewild2.example.com.
+ description: 'test zone'
+ project: "{{ gcp_project }}"
+ auth_kind: "{{ gcp_cred_kind }}"
+ service_account_file: "{{ gcp_cred_file }}"
+ scopes:
+ - https://www.googleapis.com/auth/ndev.clouddns.readwrite
+ state: present
+ register: result
+- name: assert changed is false
+ assert:
+ that:
+ - result.changed == false
+ - "result.kind == 'dns#managedZone'"
+#----------------------------------------------------------
+- name: delete a managed zone
+ gcp_dns_managed_zone:
+ name: "{{ resource_name }}"
+ dns_name: test.somewild2.example.com.
+ description: 'test zone'
+ project: "{{ gcp_project }}"
+ auth_kind: "{{ gcp_cred_kind }}"
+ service_account_file: "{{ gcp_cred_file }}"
+ scopes:
+ - https://www.googleapis.com/auth/ndev.clouddns.readwrite
+ state: absent
+ register: result
+- name: assert changed is true
+ assert:
+ that:
+ - result.changed == true
+ - result.has_key('kind') == False
+# ----------------------------------------------------------------------------
+- name: delete a managed zone that does not exist
+ gcp_dns_managed_zone:
+ name: "{{ resource_name }}"
+ dns_name: test.somewild2.example.com.
+ description: 'test zone'
+ project: "{{ gcp_project }}"
+ auth_kind: "{{ gcp_cred_kind }}"
+ service_account_file: "{{ gcp_cred_file }}"
+ scopes:
+ - https://www.googleapis.com/auth/ndev.clouddns.readwrite
+ state: absent
+ register: result
+- name: assert changed is false
+ assert:
+ that:
+ - result.changed == false
+ - result.has_key('kind') == False