diff --git a/.yamllint b/.yamllint index 45d9356..a003b96 100644 --- a/.yamllint +++ b/.yamllint @@ -1,3 +1,4 @@ +--- extends: default ignore: | .travis/ diff --git a/README.md b/README.md index f44fd7b..26a2f82 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/tasks/configure.yml b/tasks/configure.yml index 6b2d328..a1ead99 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -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/* diff --git a/tasks/install.yml b/tasks/install.yml index e1c7ff7..75cca96 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -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