ansible-roles/bind/tasks/munin.yml
Patrick Marchand 6118dda7c9
Some checks reported errors
continuous-integration/drone/push Build encountered an error
continuous-integration/drone/pr Build encountered an error
yaml lint and quoting standardisation for bind role
2019-10-09 12:15:55 -04:00

57 lines
1.2 KiB
YAML

---
- name: 'is Munin present ?'
stat:
path: '/etc/munin/plugin-conf.d/munin-node'
check_mode: false
register: munin_node_plugins_config
tags:
- bind
- munin
- name: 'Enable munin plugins for authoritative server'
file:
src: "/usr/share/munin/plugins/{{ item }}"
dest: "/etc/munin/plugins/{{ item }}"
state: 'link'
with_items:
- 'bind9'
- 'bind9_rndc'
notify: 'restart munin-node'
when:
- bind_authoritative_server
- munin_node_plugins_config.stat.exists
tags:
- bind
- munin
- name: 'Enable munin plugins for recursive server'
file:
src: "/usr/share/munin/plugins/{{ item }}"
dest: "/etc/munin/plugins/{{ item }}"
state: 'link'
with_items:
- 'bind9'
- 'bind9_rndc'
notify: 'restart munin-node'
when:
- bind_recursive_server
- munin_node_plugins_config.stat.exists
tags:
- bind
- munin
- name: 'Add munin plugin configuration'
template:
src: 'munin-env_bind9.j2'
dest: '/etc/munin/plugin-conf.d/bind9'
owner: 'root'
group: 'root'
mode: '0644'
force: true
notify: 'restart munin-node'
when: munin_node_plugins_config.stat.exists
tags:
- bind
- munin