Jérémy Lecour
8920ff1ee4
There is also the "check_mode: no", but commented, for when we switch to Ansible 2.2
25 lines
616 B
YAML
25 lines
616 B
YAML
---
|
|
|
|
- name: Check if Munin plugins exists
|
|
stat:
|
|
path: /etc/munin/plugins/
|
|
register: munin_plugins_dir
|
|
#check_mode: no (for migration to Ansible 2.2)
|
|
always_run: yes
|
|
|
|
# https://raw.githubusercontent.com/munin-monitoring/contrib/master/plugins/drbd/drbd
|
|
- name: Get Munin plugin
|
|
copy:
|
|
src: munin/drbd-plugin
|
|
dest: /etc/munin/plugins/drbd
|
|
mode: "755"
|
|
when: munin_plugins_dir.stat.exists
|
|
notify: restart munin-node
|
|
|
|
- name: Copy Munin plugin conf
|
|
copy:
|
|
src: munin/drbd-config
|
|
dest: /etc/munin/plugin-conf.d/drbd
|
|
when: munin_plugins_dir.stat.exists
|
|
notify: restart munin-node
|