vn-ansible/roles/ns/tasks/ns.yml

35 lines
823 B
YAML

- name: Update apt cache
apt:
update_cache: yes
- name: Install bind package requirements
apt:
name: "{{ bind_packages }}"
state: present
install_recommends: no
- name: Create directory
file:
path: "{{ item.path }}"
state: directory
owner: "{{ item.group }}"
group: "{{ item.group }}"
mode: "{{ item.mode }}"
loop: "{{ directory }}"
- name: Copy required files and scripts
copy:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
owner: "{{ item.group }}"
group: "{{ item.group }}"
mode: "{{ item.mode }}"
loop: "{{ required_files }}"
- name: Deploy BIND config templates
template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
owner: root
group: bind
mode: "{{ item.mode }}"
loop: "{{ bind_config_templates }}"
notify: restart-dns