Skip to content

Commit

Permalink
Add support for deploying Zone files.
Browse files Browse the repository at this point in the history
[minor]

Signed-off-by: Ben Kochie <superq@gmail.com>
  • Loading branch information
SuperQ committed Jan 25, 2020
1 parent 0a8c963 commit f989f89
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ Use it in a playbook as follows:
- cloudalchemy.coredns
```
### Demo site
## Zone files
We provide demo site for full monitoring solution based on prometheus and grafana. Repository with code and links to running instances is [available on github](https://github.com/cloudalchemy/demo-site) and site is hosted on [DigitalOcean](https://digitalocean.com).
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/).

## Local Testing

Expand Down
10 changes: 10 additions & 0 deletions tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,13 @@
group: root
mode: 0644
notify: restart coredns

- name: Copy zone files
template:
src: "{{ item }}"
dest: /etc/coredns/zones
owner: root
group: root
mode: 0644
with_fileglob:
- coredns/zones/*
7 changes: 5 additions & 2 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@
createhome: false
home: /

- name: create coredns configuration directory
- name: create coredns configuration directories
file:
path: "/etc/coredns"
path: "{{ item }}"
state: directory
owner: root
group: root
mode: 0755
with_items:
- /etc/coredns
- /etc/coredns/zones

- name: Download coredns binary to local folder
become: false
Expand Down

0 comments on commit f989f89

Please sign in to comment.