homeserver/roles/mgrote.munin-node/tasks/main.yml
mg 61d8396f43 munin_node rewrite (#125)
readme

rolle geerlingguy weg

apc_nis

rolle

playbook

docker in gruppe

vars

disabled plugins

in eigenes Repo gesichert

munin_node_additional_plugins

default plugins weg

wip

remote_src --> src

defaults und conf

rolle neu

Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/ansible#125
Co-Authored-By: mg <mg@noreply.git.mgrote.net>
Co-Committed-By: mg <mg@noreply.git.mgrote.net>
2021-06-22 13:57:45 +02:00

55 lines
1.4 KiB
YAML

---
- name: install packages
apt:
name: munin-node
state: present
register: install
- 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 additional plugins.
get_url:
url: "{{ item.src }}"
dest: "{{ munin_plugin_src_path }}{{ item.name }}"
mode: '0755'
loop: "{{ munin_node_additional_plugins }}"
when: (item.src is defined) and (item.name is defined)
- name: Enable additional plugins.
file:
src: "{{ munin_plugin_src_path }}{{ item.name }}"
dest: "{{ munin_plugin_dest_path }}{{ item.name }}"
state: link
loop: "{{ munin_node_additional_plugins }}"
notify: restart munin-node
when: item.name is defined
- name: disable unwanted plugins
file:
path: "{{ munin_plugin_dest_path }}{{ item.name }}"
state: absent
loop: "{{ munin_node_disabled_plugins }}"
notify: restart munin-node
when: item.name is defined
- name: Ensure munin-node is running.
service:
name: munin-node
state: started
enabled: yes