An octoDNS provider which brings additional features to the original YAML provider, including the ability to specify custom zone file names.
pip install octodns-yamlimproved
Pinning specific versions or SHAs is recommended to avoid unplanned upgrades.
# Start with the latest versions and don't just copy what's here
octodns==0.9.14
octodns-yamlimproved==0.0.1
providers:
config:
class: octodns_yamlimproved.YamlProvider
# The location of yaml config files (required)
directory: ./config
# Optionally specify a root folder (relative to directory) where all records will be loaded recursively
# (optional, default: use directory itself)
records_root: records
# The ttl to use for records when not specified in the data
# (optional, default 3600)
default_ttl: 3600
# Whether or not to enforce sorting order on the yaml config
# (optional, default True)
enforce_order: true
# Whether duplicate records should replace rather than error
# (optional, default False)
populate_should_replace: false
How it works: All
.yaml
or.yml
files found in the specified directory (and its subdirectories) will be automatically loaded and merged. Ifrecords_root
is set, only files under this subfolder (relative todirectory
) will be considered. You no longer need to specify a particular file name—just place your files in the desired folder.
Supports A, AAAA, NS, MX, TXT, SRV, CNAME, and PTR.
YamlImprovedProvider does not support dynamic records.
See the /script/ directory for some tools to help with the development process. They generally follow the Script to rule them all pattern. Most useful is ./script/bootstrap
which will create a venv and install both the runtime and development related requirements. It will also hook up a pre-commit hook that covers most of what's run by CI.