update requirements.yml and ansible.config
start home.xai-corp.net and home02.xai-corp.net playbooks
This commit is contained in:
@@ -2,22 +2,35 @@
|
||||
# tasks/main.yml
|
||||
# define tasks here
|
||||
|
||||
- name: set correct permissions on dirs
|
||||
file: state=directory path=/var/bind/{{ item }} owner=root group=named mode=0770
|
||||
- name: install bind package
|
||||
apt:
|
||||
name: "{{ item }}"
|
||||
update_cache: yes
|
||||
state: latest
|
||||
with_items:
|
||||
- pri
|
||||
- sec
|
||||
- dyn
|
||||
- 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 /var/bind/pri
|
||||
template: src={{ item }}.j2 dest=/var/bind/pri/{{ item }} owner=root group=named mode=0750
|
||||
- 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.conf to /etc/bind/
|
||||
template: src=named.conf.j2 dest=/etc/bind/named.conf owner=root group=named mode=0640
|
||||
- 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
|
||||
|
||||
Reference in New Issue
Block a user