linux_ws2122_ansible/roles/bind_dhcp/tasks/bind9.yaml
2021-12-11 22:46:32 +01:00

36 lines
642 B
YAML

---
- name: create dhcp config dir
file:
path: /etc/named
owner: named
group: named
mode: 0755
state: directory
- name: set up zones
template:
src: zone.j2
dest: /etc/named/{{ item.origin }}db
owner: named
group: named
mode: 0644
with_items:
- "{{ bind9_forward_zones }}"
- "{{ bind9_reverse_zones }}"
notify: restart named
- name: set up global bind config
template:
src: named.conf.j2
dest: /etc/named.conf
owner: named
group: named
mode: 0644
notify: restart named
- name: start and enabled named
systemd:
name: named
state: started
enabled: yes