ansible-role-bind/tasks/base.yml

55 lines
942 B
YAML
Raw Normal View History

2018-03-28 15:45:57 +00:00
- name: install packages for bind9
apt:
name: '{{ item }}'
state: present
with_items:
- bind9
- bind9-host
- cron
- name: create zone directory
file:
path: /etc/bind/zones
owner: bind
group: bind
mode: 0700
state: directory
- name: create log directory
file:
path: /var/log/named
owner: bind
group: bind
mode: 0700
state: directory
- name: copy bind configuration files
template:
src: '{{ item }}.j2'
dest: '/etc/bind/{{ item }}'
owner: root
group: root
mode: 0644
with_items:
- named.conf
- named.conf.options
- named.conf.local
notify: restart bind
- name: create keys directory
file:
path: /etc/bind/keys
owner: root
group: bind
mode: 0750
state: directory
2018-08-08 19:06:55 +00:00
- name: add cron dnssec
template:
src: dnssec.j2
dest: /etc/cron.weekly/dnssec
owner: root
group: root
mode: 0700
tags: bind