ansible-roles/nginx/tasks/munin_vhost.yml

42 lines
1 KiB
YAML
Raw Normal View History

2016-09-30 10:59:00 +02:00
---
- name: Add munin to hosts
lineinfile:
dest: /etc/hosts
regexp: 'munin$'
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
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
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
shell: "chmod --verbose 660 /var/log/munin/munin-cgi-*"
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:
src: systemd/spawn-fcgi-munin-graph.service
dest: /etc/systemd/system/spawn-fcgi-munin-graph.service
2021-10-02 09:35:17 +02:00
- name: Systemd unit for Munin-fcgi is started
systemd:
2016-09-30 10:59:00 +02:00
name: spawn-fcgi-munin-graph
daemon_reload: yes
2016-09-30 10:59:00 +02:00
enabled: yes
state: started