2017-07-18 19:38:03 +02:00
|
|
|
---
|
2017-04-13 17:13:52 +02:00
|
|
|
|
2019-11-26 17:48:21 +01:00
|
|
|
- name: is Munin present ?
|
2023-03-20 23:33:19 +01:00
|
|
|
ansible.builtin.stat:
|
2019-11-26 17:48:21 +01:00
|
|
|
path: /etc/munin/plugin-conf.d/munin-node
|
2019-11-26 17:58:42 +01:00
|
|
|
check_mode: no
|
2017-04-13 17:13:52 +02:00
|
|
|
register: munin_node_plugins_config
|
|
|
|
tags:
|
|
|
|
- bind
|
|
|
|
- munin
|
|
|
|
|
2019-11-26 17:48:21 +01:00
|
|
|
- name: Enable munin plugins for authoritative server
|
2023-03-20 23:33:19 +01:00
|
|
|
ansible.builtin.file:
|
2017-04-13 17:13:52 +02:00
|
|
|
src: "/usr/share/munin/plugins/{{ item }}"
|
|
|
|
dest: "/etc/munin/plugins/{{ item }}"
|
2019-11-26 17:48:21 +01:00
|
|
|
state: link
|
2021-05-04 14:18:40 +02:00
|
|
|
loop:
|
2019-11-26 17:48:21 +01:00
|
|
|
- bind9
|
|
|
|
- bind9_rndc
|
|
|
|
notify: restart munin-node
|
2019-10-09 17:47:07 +02:00
|
|
|
tags:
|
|
|
|
- bind
|
|
|
|
- munin
|
2023-03-20 23:33:19 +01:00
|
|
|
when:
|
|
|
|
- bind_authoritative_server | bool
|
|
|
|
- munin_node_plugins_config.stat.exists
|
2019-10-09 17:47:07 +02:00
|
|
|
|
2019-11-26 17:48:21 +01:00
|
|
|
- name: Enable munin plugins for recursive server
|
2023-03-20 23:33:19 +01:00
|
|
|
ansible.builtin.file:
|
2019-10-09 17:47:07 +02:00
|
|
|
src: "/usr/share/munin/plugins/{{ item }}"
|
|
|
|
dest: "/etc/munin/plugins/{{ item }}"
|
2019-11-26 17:48:21 +01:00
|
|
|
state: link
|
2021-05-04 14:18:40 +02:00
|
|
|
loop:
|
2019-11-26 17:48:21 +01:00
|
|
|
- bind9
|
|
|
|
notify: restart munin-node
|
2023-03-20 23:33:19 +01:00
|
|
|
tags:
|
|
|
|
- bind
|
|
|
|
- munin
|
2019-10-09 17:47:07 +02:00
|
|
|
when:
|
2023-02-21 18:30:09 +01:00
|
|
|
- bind_recursive_server | bool
|
|
|
|
- bind_query_file_enabled | bool
|
2019-10-09 17:47:07 +02:00
|
|
|
- munin_node_plugins_config.stat.exists
|
2017-04-13 17:13:52 +02:00
|
|
|
|
2019-11-26 17:48:21 +01:00
|
|
|
- name: Add munin plugin configuration
|
2023-03-20 23:33:19 +01:00
|
|
|
ansible.builtin.template:
|
2019-11-26 17:48:21 +01:00
|
|
|
src: munin-env_bind9.j2
|
|
|
|
dest: /etc/munin/plugin-conf.d/bind9
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: "0644"
|
2023-06-28 13:22:59 +02:00
|
|
|
force: true
|
2019-11-26 17:48:21 +01:00
|
|
|
notify: restart munin-node
|
2017-04-13 17:13:52 +02:00
|
|
|
tags:
|
|
|
|
- bind
|
|
|
|
- munin
|
2023-03-20 23:33:19 +01:00
|
|
|
when: munin_node_plugins_config.stat.exists
|