ansible-base/roles/vavrusa.knot/tasks/main.yml
2020-08-15 13:58:09 +02:00

26 lines
624 B
YAML

---
- name: install from packages
include: from_pkgs.yml
# 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