Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Added variable to make the path of zone files configureable #40

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ All variables which can be overridden are stored in [defaults/main.yml](defaults
| `coredns_binary_local_dir` | "" | Allows to use local packages instead of ones distributed on github. As parameter it takes a directory where `coredns` binary is stored on host on which ansible is ran. This overrides `coredns_version` parameter |
| `coredns_dns_port` | 53 | Port on which CoreDNS will listen for DNS requests |
| `coredns_config_file` | | This should contain path to file with coredns configuration [Corefile](https://coredns.io/manual/toc/#configuration) |
| `coredns_zone_files_paths` | ["coredns/zones/*"] | List containing paths to zone files

## Example

Expand All @@ -37,7 +38,7 @@ Use it in a playbook as follows:

## Zone files

The role will search in `coredns/zones` in the Ansible templates paths for files to deploy. These can be used with the [`file` plugin](https://coredns.io/plugins/file/).
The role will search in the paths defined in `coredns_zone_files_paths` in the Ansible templates paths for files to deploy. These can be used with the [`file` plugin](https://coredns.io/plugins/file/).

## Local Testing

Expand Down
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ coredns_config_file: ""

# Use a local binary instead of the official release.
coredns_binary_local_dir: ""

coredns_zone_files_paths:
- "coredns/zones/*"
3 changes: 1 addition & 2 deletions tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@
owner: root
group: root
mode: 0644
with_fileglob:
- coredns/zones/*
with_fileglob: "{{ coredns_zone_files_paths }}"