From 27e04ebe0e6907a41507a0e06fd34b43c7415341 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 8 Oct 2018 18:40:11 -0400 Subject: [PATCH] Update named.yml --- roles/network/tasks/named.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/roles/network/tasks/named.yml b/roles/network/tasks/named.yml index 90dd17706..a3f911caf 100644 --- a/roles/network/tasks/named.yml +++ b/roles/network/tasks/named.yml @@ -1,4 +1,4 @@ -- name: Install named packages (debuntu) +- name: Install named packages (if debuntu) package: name: "{{ item }}" state: present @@ -9,7 +9,7 @@ tags: - download -- name: Install named packages (OS's that are not debuntu) +- name: Install named packages (if not debuntu) package: name: "{{ item }}" state: present @@ -21,7 +21,7 @@ - download # or we have to change the serial number in the config files. -- name: Stop named before copying files +- name: Stop named before copying files (if first_run and debuntu) service: name: "{{ dns_service }}" state: stopped @@ -76,27 +76,27 @@ dest: "/etc/systemd/system/{{ dns_service }}.service" mode: 0644 -- name: The dns-jail redirect requires the named.blackhole, disabling recursion +- name: The dns-jail redirect requires the named.blackhole, disabling recursion (if dns_jail_enabled) # in named-iiab.conf, and the redirection of 404 error documents to / template: src: roles/network/templates/named/dns-jail.conf dest: "/etc/{{ apache_config_dir }}/" when: dns_jail_enabled -- name: Separate enabling required (debuntu) +- name: Separate enabling required (if debuntu and dns_jail_enabled) file: src: "/etc/{{ apache_config_dir }}/dns-jail.conf" path: "/etc/{{ apache_service }}/sites-enabled/dns-jail.conf" state: link when: is_debuntu and dns_jail_enabled -- name: Separate disabling required (debuntu) +- name: Separate disabling required (if debuntu and not dns_jail_enabled) file: path: "/etc/{{ apache_service }}/sites-enabled/dns-jail.conf" state: absent when: is_debuntu and not dns_jail_enabled -- name: Separate enabling/disabling required (OS's that are not debuntu) +- name: Separate enabling/disabling required (if not debuntu and not dns_jail_enabled) file: path: "/etc/{{ apache_config_dir }}/dns-jail.conf" state: absent