homeserver/roles/mgrote.munin-node/tasks/install.yml
mg 7799f2a4fe munin 2.0: you can (not) rebuild (#202)
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/ansible#202
Co-authored-by: mg <mg@noreply.git.mgrote.net>
Co-committed-by: mg <mg@noreply.git.mgrote.net>
2021-09-13 19:26:31 +02:00

37 lines
922 B
YAML

---
- name: install packages
apt:
name: munin-node
state: present
register: install
- name: create directories
file:
path: "{{ item }}"
state: directory
loop:
- /etc/munin
- /etc/munin/plugin-conf.d
- /etc/munin/plugins
- 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: munin-node-configure --shell
ansible.builtin.shell: munin-node-configure --shell
register: output_conf
changed_when: "output_conf.rc != 0"
ignore_errors: yes # ignoriere fehler
when: install.changed
- name: munin-node-configure --shell - 2
ansible.builtin.shell: munin-node-configure --shell --families=contrib,auto | sh -x
ignore_errors: yes # ignoriere fehler
when: install.changed