Przeglądaj źródła

knot role

master
commit
702fc36339
5 zmienionych plików z 49 dodań i 0 usunięć
  1. +7
    -0
      handlers/main.yml
  2. +7
    -0
      tasks/configure.yml
  3. +5
    -0
      tasks/main.yml
  4. +7
    -0
      tasks/setup-Debian.yml
  5. +23
    -0
      templates/knot.conf.j2

+ 7
- 0
handlers/main.yml Wyświetl plik

@@ -0,0 +1,7 @@
---

- name: reload knot
service:
name: knot
state: reloaded
listen: reload nameserver

+ 7
- 0
tasks/configure.yml Wyświetl plik

@@ -0,0 +1,7 @@
---

- name: knot configuration
template:
src: knot.conf.j2
dest: /etc/knot/knot.conf
notify: reload knot

+ 5
- 0
tasks/main.yml Wyświetl plik

@@ -0,0 +1,5 @@
---

- include: setup-{{ansible_os_family}}.yml

- include: configure.yml

+ 7
- 0
tasks/setup-Debian.yml Wyświetl plik

@@ -0,0 +1,7 @@
---

- name: install debian packages
apt:
pkg: "{{item}}"
with_items:
- knot

+ 23
- 0
templates/knot.conf.j2 Wyświetl plik

@@ -0,0 +1,23 @@
server:
listen: 0.0.0.0@53
listen: ::@53

log:
- target: syslog
any: info

template:
{% if nameserver_zonefile_directory is defined %}
- id: managed
storage: {{nameserver_zonefile_directory}}
semantic-checks: on
{% endif %}

zone:
{% if nameserver_zones is defined %}
{% for zone in nameserver_zones %}
- domain: {{zone.domain}}
template: managed
file: {{zone.domain}}.zone
{% endfor %}
{% endif %}

Ładowanie…
Anuluj
Zapisz