30 lines
733 B
YAML
30 lines
733 B
YAML
|
---
|
||
|
- name: install from source
|
||
|
include: from_source.yml
|
||
|
when: knot_from_source
|
||
|
- name: install from packages
|
||
|
include: from_pkgs.yml
|
||
|
when: not knot_from_source
|
||
|
|
||
|
# Post-install
|
||
|
- name: set config path (FreeBSD)
|
||
|
lineinfile: dest=/etc/rc.conf regexp='^knot_config=' line="knot_config={{ knot_install_dir }}/etc/knot/knot.conf"
|
||
|
when: ansible_os_family == "FreeBSD"
|
||
|
|
||
|
# Configuration
|
||
|
- name: configure knot
|
||
|
template: >
|
||
|
src=knot.conf.j2
|
||
|
dest={{ knot_install_dir }}/etc/knot/knot.conf
|
||
|
mode=640
|
||
|
owner={{ knot_user }}
|
||
|
group={{ knot_group }}
|
||
|
validate="knotc -c %s conf-check"
|
||
|
notify: restart knot
|
||
|
tags: dns
|
||
|
- name: enable knot
|
||
|
service: >
|
||
|
name={{ knot_daemon }}
|
||
|
enabled=True
|
||
|
state=started
|