Browse Source

some fixes

master
parent
commit
76e159fca5
3 changed files with 20 additions and 0 deletions
  1. +5
    -0
      handlers/main.yml
  2. +9
    -0
      tasks/configure.yml
  3. +6
    -0
      templates/knot.conf.j2

+ 5
- 0
handlers/main.yml View File

@@ -5,3 +5,8 @@
name: knot
state: reloaded
listen: reload nameserver

- name: restart knot
service:
name: knot
state: restarted

+ 9
- 0
tasks/configure.yml View File

@@ -5,3 +5,12 @@
src: knot.conf.j2
dest: /etc/knot/knot.conf
notify: reload knot

- name: working directory
file:
path: /var/lib/knot
state: directory
owner: knot
group: knot
recurse: yes
notify: restart knot

+ 6
- 0
templates/knot.conf.j2 View File

@@ -1,6 +1,12 @@
server:
{% if not nameserver_ips is defined%}
listen: 0.0.0.0@53
listen: ::@53
{% else %}
{% for ip in nameserver_ips %}
listen: {{ip|ipaddr('address')}}@53
{% endfor %}
{% endif %}
user: knot:knot

log:


Loading…
Cancel
Save