Skip to content

Tiny gandi.cli bash wrapper to manage Gandi DNS zone files

License

Notifications You must be signed in to change notification settings

ToucanToco/gandi-dnsManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gandi - DNS Manager

The aims of this project:

  • a basic script to manage Gandi DNS zones by cli
  • better versioning of the Gandi DNS zones

This script is a basic wrapper of Gandi cli python scripts to only manage DNS.

We wrote an How To article to help you to use it :)

Requirements

It's mandatory to have virtualenv.

On Ubuntu/Debian, you just need to launch:

$ sudo apt-get update && sudo apt-get install virtualenv

You also need to know your Gandi production API key! Enable and retrieve it via: https://www.gandi.net/admin/api_key

Setup

Before starting, you need to setup your environment.

But don't worry you only need to launch the following command:

$ ./dnsManager.sh setupAccount

Use it!

List all domains

$ ./dnsManager.sh listDomains

List all domains registered and linked to your account

Update Domain Zone

$ ./dnsManager.sh updateDomainZone mydomain.com

Update the zone with the current DNS zone file described in dns_zones/mydomain.com.txt

Get Last Domain Zone

$ ./dnsManager.sh getLastDomainZone mydomain.com

Dump from Gandi the latest version of a given DNS zone and store it in dns_zones/mydomain.com.txt

Display Help

$ ./dnsManager.sh help

See the help to list all available actions

Notes

  • all zone files are stored in ./dns_zones/ (eg: ./dns_zones/mydomain.com.txt)
  • before editing and updating a zone, be sure to have the latest version of the zone (eg: ./dnsManager.sh getLastDomainZone mydomain.com). To avoid crushing uncommitted modifications
  • if you have any doubt about your DNS modification, read the Zone_file wiki page and open a PR :)

License

This project is under MIT license

About

Tiny gandi.cli bash wrapper to manage Gandi DNS zone files

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages