gcdns_zone – Creates or removes zones in Google Cloud DNS
gcdns_zone – Creates or removes zones in Google Cloud DNS
New in version 2.2.
Synopsis
- Creates or removes managed zones in Google Cloud DNS.
Requirements
The below requirements are needed on the host that executes this module.
- apache-libcloud >= 0.19.0
Parameters
Parameter | Choices/Defaults | Comments |
---|---|---|
credentials_file - |
The path to the JSON file associated with the service account email. | |
description - |
Default: "" |
An arbitrary text string to use for the zone description. |
pem_file - |
The path to the PEM file associated with the service account email. This option is deprecated and may be removed in a future release. Use credentials_file instead. | |
project_id - |
The Google Cloud Platform project ID to use. | |
service_account_email - |
The e-mail address for a service account with access to Google Cloud DNS. | |
state - |
|
Whether the given zone should or should not be present. |
zone - / required |
The DNS domain name of the zone. This is NOT the Google Cloud DNS zone ID (e.g., example-com). If you attempt to specify a zone ID, this module will attempt to create a TLD and will fail.
|
Notes
Note
- See also gcdns_record.
- Zones that are newly created must still be set up with a domain registrar before they can be used.
Examples
# Basic zone creation example.
- name: Create a basic zone with the minimum number of parameters.
gcdns_zone: zone=example.com
# Zone removal example.
- name: Remove a zone.
gcdns_zone: zone=example.com state=absent
# Zone creation with description
- name: Creating a zone with a description
gcdns_zone: zone=example.com description="This is an awesome zone"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
description string |
success |
The zone's description
Sample: This is an awesome zone |
state string |
success |
Whether the zone is present or absent
Sample: present |
zone string |
success |
The zone's DNS name
Sample: example.com. |
Status
- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]
Authors
- William Albert (@walbert947)
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.7/modules/gcdns_zone_module.html