2016-09-30 10:59:00 +02:00
|
|
|
---
|
|
|
|
- name: Add munin to hosts
|
|
|
|
lineinfile:
|
|
|
|
dest: /etc/hosts
|
|
|
|
regexp: 'munin$'
|
2016-11-07 14:00:57 +01:00
|
|
|
line: '127.0.0.1 munin'
|
|
|
|
insertafter: EOF
|
2016-09-30 10:59:00 +02:00
|
|
|
|
2021-10-02 09:35:17 +02:00
|
|
|
- name: Packages for Munin CGI are installed
|
2016-09-30 10:59:00 +02:00
|
|
|
apt:
|
2019-12-31 15:25:10 +01:00
|
|
|
name:
|
|
|
|
- liblwp-useragent-determined-perl
|
|
|
|
- libcgi-fast-perl
|
|
|
|
- spawn-fcgi
|
2017-01-12 17:37:48 +01:00
|
|
|
state: present
|
2016-09-30 10:59:00 +02:00
|
|
|
|
2021-10-02 09:35:17 +02:00
|
|
|
- name: Owner for munin-cgi is set to www-data:munin
|
2017-12-05 23:44:59 +01:00
|
|
|
shell: "chown --verbose www-data:munin /var/log/munin/munin-cgi-*"
|
|
|
|
register: command_result
|
|
|
|
changed_when: "'changed' in command_result.stdout"
|
|
|
|
args:
|
|
|
|
warn: no
|
2016-09-30 10:59:00 +02:00
|
|
|
|
2021-10-02 09:35:17 +02:00
|
|
|
- name: Mode for munin-cgi is set to 660
|
2019-08-22 15:14:36 +02:00
|
|
|
shell: "chmod --verbose 660 /var/log/munin/munin-cgi-*"
|
2019-08-22 14:47:32 +02:00
|
|
|
register: command_result
|
|
|
|
changed_when: "'changed' in command_result.stdout"
|
|
|
|
args:
|
|
|
|
warn: no
|
|
|
|
|
2021-10-02 09:35:17 +02:00
|
|
|
- name: Systemd unit for Munin-fcgi is installed
|
2016-09-30 10:59:00 +02:00
|
|
|
copy:
|
2017-12-05 23:07:13 +01:00
|
|
|
src: systemd/spawn-fcgi-munin-graph.service
|
|
|
|
dest: /etc/systemd/system/spawn-fcgi-munin-graph.service
|
2017-01-10 14:34:47 +01:00
|
|
|
|
2021-10-02 09:35:17 +02:00
|
|
|
- name: Systemd unit for Munin-fcgi is started
|
2017-12-05 23:07:13 +01:00
|
|
|
systemd:
|
2016-09-30 10:59:00 +02:00
|
|
|
name: spawn-fcgi-munin-graph
|
2017-12-05 23:07:13 +01:00
|
|
|
daemon_reload: yes
|
2016-09-30 10:59:00 +02:00
|
|
|
enabled: yes
|
|
|
|
state: started
|