Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/luadns/dns
Template Repository for getting started with LuaDNS.
https://github.com/luadns/dns
dns lua
Last synced: about 2 months ago
JSON representation
Template Repository for getting started with LuaDNS.
- Host: GitHub
- URL: https://github.com/luadns/dns
- Owner: luadns
- Created: 2012-02-14T15:41:01.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2024-05-17T07:42:10.000Z (8 months ago)
- Last Synced: 2024-08-07T18:39:29.114Z (5 months ago)
- Topics: dns, lua
- Language: Lua
- Homepage: http://www.luadns.com/help.html
- Size: 17.6 KB
- Stars: 36
- Watchers: 2
- Forks: 10
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Example Git repository
[LuaDNS](http://www.luadns.com/) service allows you to manage DNS settings with
git.This is an example git repository, read more here:
[http://www.luadns.com/help.html#git-integration](http://www.luadns.com/help.html)## Add a new zone
To add a new zone, create a new file with zone name, appending `.lua` suffix
when using Lua format or `.bind` when using Bind format. Push your changes with
git, the zone and it's records will be added to LuaDNS name servers:```
touch example.com.lua
git add git example.com.lua
git commit -m "Add example.com zone" example.com.lua
git push
```## Remove a zone
To remove a zone, remove the file and push the changes to remove zone from
LuaDNS name servers:```
git rm example.com.lua
git commit -m "Remove example.com zone" example.com.lua
git push
```## System Templates
You can find [here](https://github.com/luadns/templates) ready to use templates for common services.
Example Usage:
```lua
-- File: example.com.lua
-- Zone: example.com-- Load system templates.
local templates = require("templates")-- Apply Google Workspace template.
templates:google_workspace()
```## Custom Templates
The `.lua` files from `templates` directory of your repository are executed
before other `.lua` files. You can put your global functions and variables
there.Examples:
* [templates](templates) - All .lua files from this directory are executed before each .lua zone file
* [example.com.lua](example.com.lua) - Example zone using Lua zone format
* [example.com.clones](example.com.clones) - Domain aliases example (one domain per line)
* [example.org.bind](example.org.bind) - Example zone using Bind zone format
* [1.168.192.in-addr.arpa.lua](1.168.192.in-addr.arpa.lua) - Reverse zone using Lua zone format## Pre-commit Hook
When changes are pushed to the git repository users are receiving an email with
the build status. The workflow can be speed up by using a [pre-commit
hook](.githooks/pre-commit) which validates your DNS files by running syntax checks.