Skip to content

Commit f8de18f

Browse files
author
em0lar
authored
Added variable to make the path of zone files configureable (#40)
[minor] release
1 parent d66b02e commit f8de18f

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ All variables which can be overridden are stored in [defaults/main.yml](defaults
2323
| `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 |
2424
| `coredns_dns_port` | 53 | Port on which CoreDNS will listen for DNS requests |
2525
| `coredns_config_file` | | This should contain path to file with coredns configuration [Corefile](https://coredns.io/manual/toc/#configuration) |
26+
| `coredns_zone_files_paths` | ["coredns/zones/*"] | List containing paths to zone files
2627

2728
## Example
2829

@@ -37,7 +38,7 @@ Use it in a playbook as follows:
3738
3839
## Zone files
3940
40-
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/).
41+
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/).
4142

4243
## Local Testing
4344

defaults/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ coredns_config_file: ""
77

88
# Use a local binary instead of the official release.
99
coredns_binary_local_dir: ""
10+
11+
coredns_zone_files_paths:
12+
- "coredns/zones/*"

tasks/configure.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,4 @@
1515
owner: root
1616
group: root
1717
mode: 0644
18-
with_fileglob:
19-
- coredns/zones/*
18+
with_fileglob: "{{ coredns_zone_files_paths }}"

0 commit comments

Comments
 (0)