Octodns: Difference between revisions
imported>Onny Initial page |
m Category:DNS added |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 17: | Line 17: | ||
== Usage == | == Usage == | ||
In this example we're going to configure the <code>A</code> record for the domain <code>example.org</code> which is managed by the provider Gandi | |||
{{file|config.yaml|yaml|<nowiki> | |||
--- | |||
providers: | |||
config: | |||
class: octodns.provider.yaml.YamlProvider | |||
directory: ./config | |||
default_ttl: 3600 | |||
# Records in the zone config don't have to be sorted alphabetically | |||
enforce_order: False | |||
gandi: | |||
class: octodns_gandi.GandiProvider | |||
token: env/GANDI_TOKEN | |||
zones: | |||
'*': | |||
sources: | |||
- config | |||
targets: | |||
- gandi | |||
</nowiki>}} | |||
Inside the directory <code>config</code> we're going to create a file with the DNS zone configuration for <code>example.org</code> | |||
{{file|config/example.org.yaml|yaml|<nowiki> | |||
--- | |||
'': | |||
- type: A | |||
value: 8.8.8.8 | |||
</nowiki>}} | |||
Apply this configuration to the domain | |||
<syntaxhighlight lang="bash"> | |||
GANDI_TOKEN=1234 octodns-sync --config config.yaml --doit | |||
</syntaxhighlight> | |||
== See also == | == See also == | ||
* Use OctoDNS as a NixOS module and declare DNS setup declarative https://github.com/Janik-Haag/NixOS-DNS | * Use OctoDNS as a NixOS module and declare DNS setup declarative https://github.com/Janik-Haag/NixOS-DNS | ||
* [[Dnscontrol]], tool to synchronize your DNS to multiple providers from a simple DSL | |||
[[Category:Applications]] | |||
[[Category:Server]] | |||
[[Category:Networking]] | |||
[[Category:DNS]] |