37 lines
922 B
YAML
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
|