- name:Disable munin-node service when it becomes disabled
service:name=munin-node
enabled=no
state=stopped
when:not munin_enabled
- name:If mysql is enabled, let munin monitor it
copy:dest=/etc/munin/plugins/
src={{ item }}
with_items:
- /usr/share/munin/plugins/mysql_
- /usr/share/munin/plugins/mysql_bytes
- /usr/share/munin/plugins/mysql_innodb
- /usr/share/munin/plugins/mysql_isam_space_
- /usr/share/munin/plugins/mysql_queries
- /usr/share/munin/plugins/mysql_slowqueries
- /usr/share/munin/plugins/mysql_threads
when:mysql_enabled
- name:Add munin to service list
ini_file:dest='{{ service_filelist }}'
section=munin
option='{{ item.option }}'
value='{{ item.value }}'
with_items:
- option:name
value:munin
- option:description
value:'"Munin is a networked resource monitoring tool that can help analyze resource trends and \"what just happened to kill our performance?\" problems."'