Rename munin-master to munin-server
This commit is contained in:
parent
63f19f7d27
commit
58c1add726
6 changed files with 1 additions and 1 deletions
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
|
Loading…
Add table
Add a link
Reference in a new issue