Skip to main content

Salt Extension for Gandi

Manage Gandi.net from Salt, through its v5 REST API.

Covers four of Gandi's APIs behind one credential and one connection profile:

  • LiveDNS -- zones, records, snapshots, DNSSEC keys, AXFR slaves and TSIG keys.
  • Domain -- registration, renewal, transfers, nameservers, glue records, web redirections, tags, contacts and registry DNSSEC.
  • Linked Zones -- one DNS zone shared across many domains.
  • Billing -- account balance and catalogue prices.

Provides an execution module and a runner for each (the runner lets the master drive Gandi without pushing an account-wide token into minion pillar), plus states for the parts that make sense to manage declaratively, all supporting test=True.

salt '*' gandi_livedns.list_records example.com
salt-run gandi_domain.list_domains
www.example.com A record:
  gandi_livedns.record_present:
    - name: www
    - zone: example.com
    - type: A
    - ttl: 3600
    - values:
      - 192.0.2.1

Requires a personal access token from the Gandi admin interface. See the User Documentation for setup.

Security

Domain registration, renewal and restoration are deliberately not exposed as states: they spend money and are largely irreversible, so they stay execution module and runner functions where a human types the command. See Configuration for guidance on scoping tokens.

If you discover a security vulnerability, please refer to Salt's security guide.

If you discover a security vulnerability, please refer to Salt's security guide.

User Documentation

For setup and usage instructions, please refer to the User Documentation.

Contributing

The saltext-gandi project welcomes contributions from anyone!

The Salt Extensions guide provides comprehensive instructions on all aspects of Salt extension development, including writing tests, running tests, writing documentation and rendering the docs.

Quickstart

To get started contributing, first clone this repository (or your fork):

# Clone the repo
git clone --origin upstream git@gitlab.com:ggiesen/saltext-gandi.git

# Change to the repo dir
cd saltext-gandi

Automatic

If you have installed direnv, copying the included .envrc.example to .envrc and allowing it to run ensures a proper development environment is present and the virtual environment is active.

Without direnv, you can still run the automation explicitly:

make dev  # or python3 tools/initialize.py
source .venv/bin/activate

Manual

Please follow the first steps, skipping the repository initialization and first commit.

Ways to contribute

Contributions come in many forms, and they're all valuable! Here are some ways you can help without writing code:

  • Documentation: Especially examples showing how to use this project to solve specific problems.
  • Triaging issues: Help manage issues.

You can also contribute by:

  • Writing blog posts
  • Sharing your experiences using Salt + Gandi on social media
  • Giving talks at conferences
  • Publishing videos
  • Engaging in IRC, Discord or email groups

Any of these things are super valuable to our community, and we sincerely appreciate every contribution!

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

saltext_gandi-0.1.0.tar.gz (165.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

saltext_gandi-0.1.0-py2.py3-none-any.whl (90.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file saltext_gandi-0.1.0.tar.gz.

File metadata

  • Download URL: saltext_gandi-0.1.0.tar.gz
  • Upload date:
  • Size: 165.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for saltext_gandi-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e6601038132b368955733d83053b409dc8288934d70b05a2e17c065f39a13ca8
MD5 24fed2cbe93d0817ad1b774657a4813d
BLAKE2b-256 19a05c120a7c82956c345d4894293b59504e9ef9f7d1d93e5d08584e96a642f3

See more details on using hashes here.

File details

Details for the file saltext_gandi-0.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: saltext_gandi-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 90.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for saltext_gandi-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8d8a1277a338f1c422913e4872a300fb5b74c65d0abb3cbc0596b430a422eb46
MD5 9655dd5da0582448d82f5b18d1132366
BLAKE2b-256 40891b93afc5e252fc5bb37bd1a8354b75157e217acf36aaf56d0ab33abe29ac

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page