Release 10.0.0 #100
|
@ -49,18 +49,18 @@
|
||||||
- restart bind
|
- restart bind
|
||||||
when: ansible_distribution_release == "jessie"
|
when: ansible_distribution_release == "jessie"
|
||||||
|
|
||||||
- name: touch /var/log/bind.log if non chroot
|
- name: "touch {{ bind_log_file }} if non chroot"
|
||||||
file:
|
file:
|
||||||
path: /var/log/bind.log
|
path: "{{ bind_log_file }}"
|
||||||
owner: bind
|
owner: bind
|
||||||
group: adm
|
group: adm
|
||||||
mode: "0640"
|
mode: "0640"
|
||||||
state: touch
|
state: touch
|
||||||
when: not bind_chroot_set
|
when: not bind_chroot_set
|
||||||
|
|
||||||
- name: touch /var/log/bind_queries.log if non chroot
|
- name: "touch {{ bind_query_file }} if non chroot"
|
||||||
file:
|
file:
|
||||||
path: /var/log/bind_queries.log
|
path: "{{ bind_query_file }}"
|
||||||
owner: bind
|
owner: bind
|
||||||
group: adm
|
group: adm
|
||||||
mode: "0640"
|
mode: "0640"
|
||||||
|
@ -95,7 +95,7 @@
|
||||||
notify: restart bind
|
notify: restart bind
|
||||||
when: bind_chroot_set
|
when: bind_chroot_set
|
||||||
|
|
||||||
- name: logrotate for non chroot bind
|
- name: logrotate for bind
|
||||||
template:
|
template:
|
||||||
src: logrotate_bind
|
src: logrotate_bind
|
||||||
dest: /etc/logrotate.d/bind9
|
dest: /etc/logrotate.d/bind9
|
||||||
|
@ -104,17 +104,5 @@
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
force: yes
|
force: yes
|
||||||
notify: restart bind
|
notify: restart bind
|
||||||
when: not bind_chroot_set
|
|
||||||
|
|
||||||
- name: logrotate for chroot bind
|
|
||||||
template:
|
|
||||||
src: logrotate_bind_chroot.j2
|
|
||||||
dest: /etc/logrotate.d/bind9
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: "0644"
|
|
||||||
force: yes
|
|
||||||
notify: restart bind
|
|
||||||
when: bind_chroot_set
|
|
||||||
|
|
||||||
- include: munin.yml
|
- include: munin.yml
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
/var/log/bind.log {
|
{% if bind_chroot_set %}
|
||||||
|
{{ bind_chroot_path }}{{bind_log_file}} {
|
||||||
|
{% else %}
|
||||||
|
{{bind_log_file}} {
|
||||||
|
{% endif %}
|
||||||
weekly
|
weekly
|
||||||
missingok
|
missingok
|
||||||
rotate 52
|
rotate 52
|
|
@ -1,10 +0,0 @@
|
||||||
{{ bind_chroot_path }}/var/log/bind.log {
|
|
||||||
weekly
|
|
||||||
missingok
|
|
||||||
rotate 52
|
|
||||||
create 640 bind bind
|
|
||||||
sharedscripts
|
|
||||||
postrotate
|
|
||||||
rndc reload > /dev/null
|
|
||||||
endscript
|
|
||||||
}
|
|
|
@ -1,8 +1,9 @@
|
||||||
[bind*]
|
[bind*]
|
||||||
user root
|
user root
|
||||||
env.logfile {{ bind_query_file }}
|
|
||||||
|
env.logfile {% if bind_chroot_set %}{{ bind_chroot_path }}{% endif %}{{ bind_query_file }}
|
||||||
{% if bind_authoritative_server %}
|
{% if bind_authoritative_server %}
|
||||||
env.querystats {{ bind_chroot_path }}{{ bind_statistics_file }}
|
env.querystats {% if bind_chroot_set %}{{ bind_chroot_path }}{% endif %}{{ bind_statistics_file }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
env.MUNIN_PLUGSTATE /var/lib/munin
|
env.MUNIN_PLUGSTATE /var/lib/munin
|
||||||
timeout 120
|
timeout 120
|
||||||
|
|
Loading…
Reference in a new issue