Rename munin-master to munin-server
This commit is contained in:
parent
63f19f7d27
commit
58c1add726
6 changed files with 1 additions and 1 deletions
11
roles/munin-server/files/munin-apache.conf
Normal file
11
roles/munin-server/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/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>
|
4
roles/munin-server/files/override.conf
Normal file
4
roles/munin-server/files/override.conf
Normal file
|
@ -0,0 +1,4 @@
|
|||
|
||||
graph_strategy cgi
|
||||
cgiurl_graph /munin-cgi/munin-cgi-graph
|
||||
cgitmpdir /var/run/munin/cgi-tmp
|
5
roles/munin-server/meta/main.yml
Normal file
5
roles/munin-server/meta/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
dependencies:
|
||||
- {role: apache}
|
||||
- {role: epel-repo}
|
||||
- {role: powertools-repo}
|
84
roles/munin-server/tasks/main.yml
Normal file
84
roles/munin-server/tasks/main.yml
Normal file
|
@ -0,0 +1,84 @@
|
|||
---
|
||||
- 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
|
||||
|
||||
# this needs better rule
|
||||
- name: fix selinux write errors
|
||||
seboolean:
|
||||
name: domain_can_mmap_files
|
||||
state: true
|
||||
persistent: true
|
||||
|
||||
- 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: fix selinx contexts from cache directory
|
||||
sefcontext:
|
||||
path: "/var/run/munin/cgi-tmp(/.*)?"
|
||||
setype: munin_rw_content_t
|
||||
|
||||
- name: add cache direcory to tmpfiles
|
||||
copy:
|
||||
dest: /etc/tmpfiles.d/munin.conf
|
||||
content: "d /run/munin/cgi-tmp 0755 apache apache -"
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
||||
- name: create cache directory
|
||||
file:
|
||||
path: /var/run/munin/cgi-tmp
|
||||
state: directory
|
||||
mode: 0755
|
||||
owner: apache
|
||||
group: apache
|
||||
setype: _default
|
||||
|
||||
- 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: create override config
|
||||
copy:
|
||||
dest: /etc/munin/conf.d/00-override.conf
|
||||
src: override.conf
|
||||
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
|
5
roles/munin-server/templates/tls.conf.j2
Normal file
5
roles/munin-server/templates/tls.conf.j2
Normal file
|
@ -0,0 +1,5 @@
|
|||
tls paranoid
|
||||
tls_verify_certificate yes
|
||||
tls_private_key {{ tls_private }}/{{ inventory_hostname }}.key
|
||||
tls_certificate {{ tls_certs }}/{{ inventory_hostname }}.crt
|
||||
tls_ca_certificate {{ tls_certs }}/ca.crt
|
Loading…
Add table
Add a link
Reference in a new issue