Files
provisioning/roles/ns.xai-corp.net/tasks/main.yml
richard c26a0e2d21 update requirements.yml and ansible.config
start home.xai-corp.net and home02.xai-corp.net playbooks
2016-12-12 07:23:37 -05:00

37 lines
853 B
YAML

---
# tasks/main.yml
# define tasks here
- name: install bind package
apt:
name: "{{ item }}"
update_cache: yes
state: latest
with_items:
- bind9
- name: set correct permissions for logging
file:
state=directory
path=/var/log/named/
owner={{ bind.user }}
group={{ bind.group }}
mode=0777
notify:
- restart bind
- name: copy zone files to /etc/bind/
template: src={{ item }}.j2 dest=/etc/bind/db.{{ item }} owner={{ bind.user }} group={{ bind.group }} mode=0644
with_items: "{{ bind.zonefiles }}"
notify:
- restart bind
- name: copy named.confs to /etc/bind/
template: src={{ item }}.j2 dest=/etc/bind/{{ item }} owner={{ bind.user }} group={{ bind.group }} mode=0640
with_items:
- named.conf.local
- named.conf.options
- named.conf.default-zones
notify:
- restart bind