浏览代码

knot role

master
当前提交
702fc36339
共有 5 个文件被更改,包括 49 次插入0 次删除
  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 查看文件

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

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

+ 7
- 0
tasks/configure.yml 查看文件

@@ -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 查看文件

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

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

- include: configure.yml

+ 7
- 0
tasks/setup-Debian.yml 查看文件

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

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

+ 23
- 0
templates/knot.conf.j2 查看文件

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

正在加载...
取消
保存