Use this module to manage nameservers through the namecheap api. The Namecheap settings will be set in grains.
This module uses the following python libraries to communicate to the namecheap API:
requests
pip install requests
As saltstack depends on requests
this shouldn't be a problem
The namecheap username, api key and url should be set in a minion configuration file or pillar
namecheap.name: companyname
namecheap.key: a1b2c3d4e5f67a8b9c0d1e2f3
namecheap.client_ip: 162.155.30.172
#Real url
namecheap.url: https://api.namecheap.com/xml.response
#Sandbox url
#namecheap.url: https://api.sandbox.namecheap.xml.response
salt.modules.namecheap_ns.
create
(sld, tld, nameserver, ip)¶Creates a new nameserver
returns True if the nameserver was created successfully
CLI Example:
salt '*' namecheap_domains_ns.create sld tld nameserver ip
salt.modules.namecheap_ns.
delete
(sld, tld, nameserver)¶Deletes a nameserver
returns True if the nameserver was deleted successfully
CLI Example:
salt '*' namecheap_domains_ns.delete sld tld nameserver
salt.modules.namecheap_ns.
get_info
(sld, tld, nameserver)¶Retrieves information about a registered nameserver
CLI Example:
salt '*' namecheap_domains_ns.get_info sld tld nameserver
salt.modules.namecheap_ns.
update
(sld, tld, nameserver, old_ip, new_ip)¶Deletes a nameserver
returns True if the nameserver was updated successfully
CLI Example:
salt '*' namecheap_domains_ns.update sld tld nameserver old_ip new_ip