munin-master: Initial version of role, WIP
This commit is contained in:
parent
71d392a556
commit
cab7f424d5
3 changed files with 43 additions and 0 deletions
11
roles/munin-master/files/munin-apache.conf
Normal file
11
roles/munin-master/files/munin-apache.conf
Normal file
|
@ -0,0 +1,11 @@
|
|||
Alias /static/ /etc/munin/static/
|
||||
<Directory /etc/munin/static>
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
ScriptAlias /munin-cgi-graph /var/www/html/munin/cgi/munin-cgi-graph
|
||||
ScriptAlias / /var/www/html/munin/cgi/munin-cgi-html/
|
||||
<Directory /var/www/html/munin/cgi>
|
||||
Require all granted
|
||||
SetHandler cgi-script
|
||||
</Directory>
|
5
roles/munin-master/meta/main.yml
Normal file
5
roles/munin-master/meta/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
dependencies:
|
||||
- {role: apache}
|
||||
- {role: epel-repo}
|
||||
- {role: powertools-repo}
|
27
roles/munin-master/tasks/main.yml
Normal file
27
roles/munin-master/tasks/main.yml
Normal file
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
- 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: 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: enable cron job
|
||||
systemd:
|
||||
name: munin.timer
|
||||
enabled: true
|
Loading…
Add table
Reference in a new issue