homeserver/roles/mgrote.munin-node/tasks/additional.yml
mg ce709e7918 systemd: chrony --> timesyncd (#329)
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/ansible#329
Co-authored-by: mg <michael.grote@posteo.de>
Co-committed-by: mg <michael.grote@posteo.de>
2022-02-18 20:34:43 +01:00

34 lines
1,012 B
YAML

---
- name: download additional plugins
get_url:
url: "{{ item.src }}"
dest: "{{ munin_plugin_src_path }}{{ item.name }}"
mode: '0755'
loop: "{{ munin_node_plugins }}"
notify: restart munin-node
no_log: true
check_mode: no # damit werden auch im check-mode die Plugins heruntergeladen, sonst schlägt der nächste Task fehl
- name: enable additional plugins
file:
src: "{{ munin_plugin_src_path }}{{ item.name }}"
dest: "{{ munin_plugin_dest_path }}{{ item.name }}"
state: link
notify: restart munin-node
loop: "{{ munin_node_plugins }}"
no_log: true
- name: copy additional plugin-config
copy:
content: "{{ item.config }}"
dest: "{{ munin_plugin_conf_dest_path }}{{ item.name }}"
notify: restart munin-node
loop: "{{ munin_node_plugins }}"
when: item.config is defined
no_log: true
- name: Ensure munin-node is running.
service:
name: munin-node
state: started
enabled: yes