47 lines
896 B
YAML
47 lines
896 B
YAML
---
|
|
- name: install packages
|
|
package:
|
|
name: munin
|
|
state: installed
|
|
|
|
# for some reason this is owned by adm default
|
|
- name: fix log directory group
|
|
file:
|
|
path: /var/log/munin
|
|
state: directory
|
|
owner: munin
|
|
group: apache
|
|
|
|
- name: add munin to hostkey group
|
|
user:
|
|
name: munin
|
|
groups: hostkey
|
|
append: yes
|
|
|
|
- name: create apache config
|
|
copy:
|
|
dest: /etc/httpd/conf.local.d/munin.conf
|
|
src: munin-apache.conf
|
|
mode: 0644
|
|
owner: root
|
|
group: "{{ ansible_wheel }}"
|
|
notify: restart apache
|
|
|
|
- name: create tls config
|
|
template:
|
|
dest: /etc/munin/conf.d/00-tls.conf
|
|
src: tls.conf.j2
|
|
mode: 0644
|
|
owner: root
|
|
group: "{{ ansible_wheel }}"
|
|
|
|
- name: remove localhost node
|
|
file:
|
|
path: /etc/munin/conf.d/local.conf
|
|
state: absent
|
|
|
|
- name: enable cron job
|
|
systemd:
|
|
name: munin.timer
|
|
state: started
|
|
enabled: true
|