infra/playbooks/20-bind.yaml

30 lines
746 B
YAML
Raw Normal View History

2024-06-11 21:24:37 +00:00
---
- name: Bind configuration
hosts: all
tasks:
- name: Install chrony
ansible.builtin.apt:
name:
- bind9
- name: Install conf file
ansible.builtin.copy:
src: bind/conf
dest: /etc/bind/named.conf.local
owner: root # TODO check
mode: '0600' # TODO check
# directory_mode: '0700' # TODO check
- name: Install zone file
ansible.builtin.copy:
src: bind/zones
dest: /etc/bind/zones/db.golem.linux.it
owner: root # TODO check
mode: '0600' # TODO check
# directory_mode: '0700' # TODO check
- name: Restart bind to apply changes
ansible.builtin.systemd:
name: bind9.service
state: restarted