mg
e25db9f0ff
Plugins in eigenes repo plugin zpool capacity eingefügt Doku Squid + noch ein falsches hddtemp entfernt falsches hddtemp entfernt eneues taskplugins entfernen yaml syntax geerlingguy umgebaut Doku Doku zfs_usage entfernt Bugfix: munin: zfs_arcstats Co-authored-by: Michael Grote <michael.grote@posteo.de> Reviewed-on: mg/ansible#8 Co-Authored-By: mg <mg@noreply.git.mgrote.net> Co-Committed-By: mg <mg@noreply.git.mgrote.net>
63 lines
1.7 KiB
YAML
63 lines
1.7 KiB
YAML
---
|
|
- name: Ensure munin-node is installed (Debian).
|
|
apt:
|
|
name: munin-node
|
|
state: present
|
|
when: ansible_os_family == 'Debian'
|
|
|
|
- name: Copy munin-node configuration.
|
|
template:
|
|
src: munin-node.conf.j2
|
|
dest: /etc/munin/munin-node.conf
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
notify: restart munin-node
|
|
|
|
- name: Generate plugin configuration.
|
|
template:
|
|
src: plugin-conf.j2
|
|
dest: /etc/munin/plugin-conf.d/ansible.conf
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
notify: restart munin-node
|
|
|
|
- name: Install extra plugins.
|
|
copy:
|
|
src: "{{ item.src }}"
|
|
dest: "{{ munin_plugin_src_path }}{{ item.src | basename }}"
|
|
mode: '0755'
|
|
with_items: "{{ munin_node_install_plugins }}"
|
|
when: item.src is defined
|
|
notify: restart munin-node
|
|
|
|
- name: Install extra remote plugins.
|
|
get_url:
|
|
url: "{{ item.remote_src }}"
|
|
dest: "{{ munin_plugin_src_path }}{{ item.remote_src | basename }}"
|
|
mode: '0755'
|
|
with_items: "{{ munin_node_install_plugins }}"
|
|
when: item.remote_src is defined
|
|
notify: restart munin-node
|
|
|
|
- name: Enable additional plugins.
|
|
file: # noqa 208
|
|
path: "{{ munin_plugin_dest_path }}{{ item.name }}"
|
|
src: "{{ munin_plugin_src_path }}{{ item.plugin | default( item.name ) }}"
|
|
state: link
|
|
with_items: "{{ munin_node_plugins }}"
|
|
notify: restart munin-node
|
|
|
|
- name: remove unwanted plugins
|
|
file: # noqa 208
|
|
path: "{{ munin_plugin_dest_path }}{{ item.name }}"
|
|
state: absent
|
|
with_items: "{{ munin_node_remove_plugins }}"
|
|
notify: restart munin-node
|
|
|
|
- name: Ensure munin-node is running.
|
|
service:
|
|
name: munin-node
|
|
state: started
|
|
enabled: yes
|