1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Update named.yml

This commit is contained in:
A Holt 2018-10-08 18:40:11 -04:00 committed by GitHub
parent e94077fc3d
commit 27e04ebe0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
- name: Install named packages (debuntu) - name: Install named packages (if debuntu)
package: package:
name: "{{ item }}" name: "{{ item }}"
state: present state: present
@ -9,7 +9,7 @@
tags: tags:
- download - download
- name: Install named packages (OS's that are not debuntu) - name: Install named packages (if not debuntu)
package: package:
name: "{{ item }}" name: "{{ item }}"
state: present state: present
@ -21,7 +21,7 @@
- download - download
# or we have to change the serial number in the config files. # 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: service:
name: "{{ dns_service }}" name: "{{ dns_service }}"
state: stopped state: stopped
@ -76,27 +76,27 @@
dest: "/etc/systemd/system/{{ dns_service }}.service" dest: "/etc/systemd/system/{{ dns_service }}.service"
mode: 0644 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 / # in named-iiab.conf, and the redirection of 404 error documents to /
template: template:
src: roles/network/templates/named/dns-jail.conf src: roles/network/templates/named/dns-jail.conf
dest: "/etc/{{ apache_config_dir }}/" dest: "/etc/{{ apache_config_dir }}/"
when: dns_jail_enabled when: dns_jail_enabled
- name: Separate enabling required (debuntu) - name: Separate enabling required (if debuntu and dns_jail_enabled)
file: file:
src: "/etc/{{ apache_config_dir }}/dns-jail.conf" src: "/etc/{{ apache_config_dir }}/dns-jail.conf"
path: "/etc/{{ apache_service }}/sites-enabled/dns-jail.conf" path: "/etc/{{ apache_service }}/sites-enabled/dns-jail.conf"
state: link state: link
when: is_debuntu and dns_jail_enabled when: is_debuntu and dns_jail_enabled
- name: Separate disabling required (debuntu) - name: Separate disabling required (if debuntu and not dns_jail_enabled)
file: file:
path: "/etc/{{ apache_service }}/sites-enabled/dns-jail.conf" path: "/etc/{{ apache_service }}/sites-enabled/dns-jail.conf"
state: absent state: absent
when: is_debuntu and not dns_jail_enabled 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: file:
path: "/etc/{{ apache_config_dir }}/dns-jail.conf" path: "/etc/{{ apache_config_dir }}/dns-jail.conf"
state: absent state: absent