ansible-base/roles/vavrusa.knot/tasks/main.yml

26 lines
624 B
YAML
Raw Normal View History

2020-08-15 12:00:29 +02:00
---
- 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