Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add support for deploying Zone files. #32

Merged
merged 1 commit into from
Jan 25, 2020
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
1 change: 1 addition & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
extends: default
ignore: |
.travis/
Expand Down
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