2017-07-18 19:38:03 +02:00
|
|
|
---
|
2017-04-13 17:13:52 +02:00
|
|
|
|
2019-10-09 18:15:55 +02:00
|
|
|
- name: 'is Munin present ?'
|
2017-04-13 17:13:52 +02:00
|
|
|
stat:
|
2019-10-09 18:15:55 +02:00
|
|
|
path: '/etc/munin/plugin-conf.d/munin-node'
|
2019-10-09 18:07:14 +02:00
|
|
|
check_mode: false
|
2017-04-13 17:13:52 +02:00
|
|
|
register: munin_node_plugins_config
|
|
|
|
tags:
|
|
|
|
- bind
|
|
|
|
- munin
|
|
|
|
|
2019-10-09 18:15:55 +02:00
|
|
|
- name: 'Enable munin plugins for authoritative server'
|
2017-04-13 17:13:52 +02:00
|
|
|
file:
|
|
|
|
src: "/usr/share/munin/plugins/{{ item }}"
|
|
|
|
dest: "/etc/munin/plugins/{{ item }}"
|
2019-10-09 18:15:55 +02:00
|
|
|
state: 'link'
|
2017-07-18 19:38:03 +02:00
|
|
|
with_items:
|
2019-10-09 18:15:55 +02:00
|
|
|
- 'bind9'
|
|
|
|
- 'bind9_rndc'
|
|
|
|
notify: 'restart munin-node'
|
2019-10-09 17:47:07 +02:00
|
|
|
when:
|
|
|
|
- bind_authoritative_server
|
|
|
|
- munin_node_plugins_config.stat.exists
|
|
|
|
tags:
|
|
|
|
- bind
|
|
|
|
- munin
|
|
|
|
|
2019-10-09 18:15:55 +02:00
|
|
|
- name: 'Enable munin plugins for recursive server'
|
2019-10-09 17:47:07 +02:00
|
|
|
file:
|
|
|
|
src: "/usr/share/munin/plugins/{{ item }}"
|
|
|
|
dest: "/etc/munin/plugins/{{ item }}"
|
2019-10-09 18:15:55 +02:00
|
|
|
state: 'link'
|
2019-10-09 17:47:07 +02:00
|
|
|
with_items:
|
2019-10-09 18:15:55 +02:00
|
|
|
- 'bind9'
|
|
|
|
- 'bind9_rndc'
|
|
|
|
notify: 'restart munin-node'
|
2019-10-09 17:47:07 +02:00
|
|
|
when:
|
|
|
|
- bind_recursive_server
|
|
|
|
- munin_node_plugins_config.stat.exists
|
2017-04-13 17:13:52 +02:00
|
|
|
tags:
|
|
|
|
- bind
|
|
|
|
- munin
|
|
|
|
|
2019-10-09 18:15:55 +02:00
|
|
|
- name: 'Add munin plugin configuration'
|
2017-04-13 17:13:52 +02:00
|
|
|
template:
|
2019-10-09 18:15:55 +02:00
|
|
|
src: 'munin-env_bind9.j2'
|
|
|
|
dest: '/etc/munin/plugin-conf.d/bind9'
|
|
|
|
owner: 'root'
|
|
|
|
group: 'root'
|
|
|
|
mode: '0644'
|
2019-10-09 18:07:14 +02:00
|
|
|
force: true
|
2019-10-09 18:15:55 +02:00
|
|
|
notify: 'restart munin-node'
|
2019-10-09 17:47:07 +02:00
|
|
|
when: munin_node_plugins_config.stat.exists
|
2017-04-13 17:13:52 +02:00
|
|
|
tags:
|
|
|
|
- bind
|
|
|
|
- munin
|