Connection module for Apache Libcloud DNS management
New in version 2016.11.0.
This module uses a configuration profile for one or multiple DNS providers
libcloud_dns:
profile_test1:
driver: cloudflare
key: 12345
secret: mysecret
profile_test2:
driver: godaddy
key: 12345
secret: mysecret
shopper_id: 12345
apache-libcloud
salt.modules.libcloud_dns.
create_record
(name, zone_id, type, data, profile)¶Create a new record.
name (str
) -- Record name without the domain name (e.g. www).
Note: If you want to create a record for a base domain
name, you should specify empty string ('') for this
argument.
zone_id (str
) -- Zone where the requested record is created.
type (str
) -- DNS record type (A, AAAA, ...).
data (str
) -- Data for the record (depends on the record type).
profile (str
) -- The profile key
CLI Example:
salt myminion libcloud_dns.create_record www google.com A 12.32.12.2 profile1
salt.modules.libcloud_dns.
create_zone
(domain, profile, type='master', ttl=None)¶Create a new zone.
domain (str
) -- Zone domain name (e.g. example.com)
profile (str
) -- The profile key
type (str
) -- Zone type (master / slave).
ttl (int
) -- TTL for new records. (optional)
CLI Example:
salt myminion libcloud_dns.create_zone google.com profile1
salt.modules.libcloud_dns.
delete_record
(zone_id, record_id, profile)¶Delete a record.
zone_id (str
) -- Zone to delete.
record_id (str
) -- Record to delete.
profile (str
) -- The profile key
bool
CLI Example:
salt myminion libcloud_dns.delete_record google.com www profile1
salt.modules.libcloud_dns.
delete_zone
(zone_id, profile)¶Delete a zone.
zone_id (str
) -- Zone to delete.
profile (str
) -- The profile key
bool
CLI Example:
salt myminion libcloud_dns.delete_zone google.com profile1
salt.modules.libcloud_dns.
extra
(method, profile, **libcloud_kwargs)¶Call an extended method on the driver
method (str
) -- Driver's method name
profile (str
) -- The profile key
libcloud_kwargs (dict
) -- Extra arguments for the driver's delete_container method
CLI Example:
salt myminion libcloud_dns.extra ex_get_permissions google container_name=my_container object_name=me.jpg --out=yaml
salt.modules.libcloud_dns.
get_bind_data
(zone_id, profile)¶Export Zone to the BIND compatible format.
zone_id (str
) -- Zone to export.
profile (str
) -- The profile key
Zone data in BIND compatible format.
str
CLI Example:
salt myminion libcloud_dns.get_bind_data google.com profile1
salt.modules.libcloud_dns.
get_record
(zone_id, record_id, profile)¶Get record information for the given zone_id on the given profile
zone_id (str
) -- Zone to export.
record_id (str
) -- Record to delete.
profile (str
) -- The profile key
CLI Example:
salt myminion libcloud_dns.get_record google.com www profile1
salt.modules.libcloud_dns.
get_zone
(zone_id, profile)¶Get zone information for the given zone_id on the given profile
zone_id (str
) -- Zone to export.
profile (str
) -- The profile key
CLI Example:
salt myminion libcloud_dns.get_zone google.com profile1
salt.modules.libcloud_dns.
list_record_types
(profile)¶List available record types for the given profile, e.g. A, AAAA
profile (str
) -- The profile key
CLI Example:
salt myminion libcloud_dns.list_record_types profile1
salt.modules.libcloud_dns.
list_records
(zone_id, profile, type=None)¶List records for the given zone_id on the given profile
zone_id (str
) -- Zone to export.
profile (str
) -- The profile key
type (str
) -- The record type, e.g. A, NS
CLI Example:
salt myminion libcloud_dns.list_records google.com profile1
salt.modules.libcloud_dns.
list_zones
(profile)¶List zones for the given profile
profile (str
) -- The profile key
CLI Example:
salt myminion libcloud_dns.list_zones profile1
salt.modules.libcloud_dns.
update_zone
(zone_id, domain, profile, type='master', ttl=None)¶Update an existing zone.
zone_id (str
) -- Zone ID to update.
domain (str
) -- Zone domain name (e.g. example.com)
profile (str
) -- The profile key
type (str
) -- Zone type (master / slave).
ttl (int
) -- TTL for new records. (optional)
CLI Example:
salt myminion libcloud_dns.update_zone google.com google.com profile1 type=slave