Ver código fonte

knot role

master
commit
702fc36339
5 arquivos alterados com 49 adições e 0 exclusões
  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 Ver arquivo

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

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

+ 7
- 0
tasks/configure.yml Ver arquivo

@@ -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 Ver arquivo

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

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

- include: configure.yml

+ 7
- 0
tasks/setup-Debian.yml Ver arquivo

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

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

+ 23
- 0
templates/knot.conf.j2 Ver arquivo

@@ -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 %}

Carregando…
Cancelar
Salvar