dnscontrol/providers/octodns/mkprodyaml.sh
Tom Limoncelli 54de1ff698
NEW PROVIDER: OctoDNS (#309)
* govendor gopkg.in/yaml.v2
* Ignore YAML and BIND test data litter.  Create README.txt files to force git to create subdirectories.
* Update convertzone to also read OctoDNS files
2018-02-27 17:36:47 -05:00

17 lines
406 B
Bash
Executable file

#!/bin/bash
# Read the YAML files in the config directory and generate a production.yaml file.
cat <<HERE >production.yaml
---
providers:
config:
class: octodns.provider.yaml.YamlProvider
directory: ./config
zones:
HERE
( cd config && ls *.yaml ) |
grep -v '^provider.yaml$' |
sed 's/.\{4\}$//' |
awk '{ print " " $1 ":" ; print " sources:" ; print " - config" }' >>production.yaml