update..
This commit is contained in:
@ -50,7 +50,7 @@
|
||||
mode: '0755'
|
||||
|
||||
|
||||
- name: (caching-nameserver.yml) update named.conf.options configuration file
|
||||
- name: (caching-nameserver.yml) update named.conf.options configuration file (normal server)
|
||||
template:
|
||||
src: etc/bind/named.conf.options.j2
|
||||
dest: /etc/bind/named.conf.options
|
||||
@ -63,6 +63,36 @@
|
||||
tags:
|
||||
- apt-caching-nameserver
|
||||
- caching-nameserver
|
||||
when:
|
||||
- inventory_hostname not in groups["gateway_server"]
|
||||
|
||||
# --------------------
|
||||
|
||||
# In case of gateway gateway servers ONLY if bind ption file NOT exists
|
||||
#
|
||||
- name: Check if file '/etc/bind/named.conf.options' exists
|
||||
stat:
|
||||
path: /etc/bind/named.conf.options
|
||||
register: file_named_conf_options
|
||||
|
||||
- name: (caching-nameserver.yml) update named.conf.options configuration file (gateway server)
|
||||
template:
|
||||
src: etc/bind/named.conf.options.gateway.j2
|
||||
dest: /etc/bind/named.conf.options
|
||||
backup: yes
|
||||
owner: root
|
||||
group: bind
|
||||
mode: 0644
|
||||
#validate: visudo -cf %s
|
||||
notify: Reload bind9
|
||||
tags:
|
||||
- apt-caching-nameserver
|
||||
- caching-nameserver
|
||||
when:
|
||||
- inventory_hostname in groups["gateway_server"]
|
||||
- not file_named_conf_options.stat.exists
|
||||
|
||||
# --------------------
|
||||
|
||||
|
||||
- name: (caching-nameserver.yml) Add 127.0.0.1 as first nameserver entry to /etc/resolv.conf
|
||||
|
Reference in New Issue
Block a user