ansible-roles/nginx/tasks/munin_vhost.yml

42 lines
1,013 B
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
- name: Ensure packages for Munin CGI are installed
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
- name: Adjust owner for munin-cgi
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
- name: Adjust rights for munin-cgi
shell: "chmod --verbose 660 /var/log/munin/munin-cgi-*"
register: command_result
changed_when: "'changed' in command_result.stdout"
args:
warn: no
- name: Systemd unit for Munin-fcgi
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
- name: Enable and start Munin-fcgi
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