munin: Remove unused roles
This commit is contained in:
parent
3c851a572a
commit
1304afb5bf
13 changed files with 0 additions and 237 deletions
|
@ -1,10 +0,0 @@
|
|||
---
|
||||
- name: Restart munin-node
|
||||
ansible.builtin.service:
|
||||
name: "{{ munin_node_service }}"
|
||||
state: restarted
|
||||
|
||||
- name: Configure munin-node
|
||||
ansible.builtin.shell:
|
||||
cmd: munin-node-configure --shell --remove-also 2> /dev/null | /bin/sh
|
||||
notify: Restart munin-node
|
|
@ -1,11 +0,0 @@
|
|||
---
|
||||
dependencies:
|
||||
- role: epel_repo
|
||||
when:
|
||||
- ansible_distribution != "Fedora"
|
||||
- ansible_os_family == "RedHat"
|
||||
- role: powertools_repo
|
||||
when:
|
||||
- ansible_distribution != "Fedora"
|
||||
- ansible_os_family == "RedHat"
|
||||
- ansible_distribution_major_version|int == 8
|
|
@ -1,24 +0,0 @@
|
|||
---
|
||||
- name: Include OS-specific variables
|
||||
ansible.builtin.include_vars: "{{ ansible_os_family }}.yml"
|
||||
|
||||
- name: Install packages
|
||||
ansible.builtin.package:
|
||||
name: "{{ item }}"
|
||||
state: installed
|
||||
with_items: "{{ munin_node_packages }}"
|
||||
|
||||
- name: Create config
|
||||
ansible.builtin.template:
|
||||
dest: /etc/munin/munin-node.conf
|
||||
src: munin-node.conf.j2
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: Configure munin-node
|
||||
|
||||
- name: Enable service
|
||||
ansible.builtin.service:
|
||||
name: "{{ munin_node_service }}"
|
||||
state: started
|
||||
enabled: true
|
|
@ -1,33 +0,0 @@
|
|||
|
||||
log_level 4
|
||||
log_file {{ munin_node_logfile }}
|
||||
pid_file /var/run/munin/munin-node.pid
|
||||
|
||||
background 1
|
||||
setsid 1
|
||||
|
||||
user root
|
||||
group {{ ansible_wheel }}
|
||||
|
||||
# Regexps for files to ignore
|
||||
ignore_file ~$
|
||||
ignore_file \.bak$
|
||||
ignore_file %$
|
||||
ignore_file \.dpkg-(tmp|new|old|dist)$
|
||||
ignore_file \.rpm(save|new)$
|
||||
ignore_file \.pod$
|
||||
|
||||
host_name {{ inventory_hostname }}
|
||||
|
||||
# Which address to bind to;
|
||||
host *
|
||||
|
||||
# And which port
|
||||
port 4949
|
||||
|
||||
# Require TLS
|
||||
tls paranoid
|
||||
tls_verify_certificate yes
|
||||
tls_ca_certificate {{ tls_certs }}/ca.crt
|
||||
tls_certificate {{ tls_certs }}/{{ inventory_hostname }}.crt
|
||||
tls_private_key {{ tls_private }}/{{ inventory_hostname }}.key
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
munin_node_logfile: /var/log/munin/munin-node.log
|
||||
munin_node_service: munin_node
|
||||
munin_node_packages:
|
||||
- munin-node
|
||||
- p5-Net-SSLeay
|
|
@ -1,4 +0,0 @@
|
|||
---
|
||||
munin_node_logfile: /var/log/munin-node/munin-node.log
|
||||
munin_node_service: munin-node
|
||||
munin_node_packages: munin-node
|
|
@ -1,11 +0,0 @@
|
|||
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>
|
|
@ -1,2 +0,0 @@
|
|||
d /run/munin 0775 root munin -
|
||||
d /run/munin/cgi-tmp 0755 apache apache -
|
|
@ -1,5 +0,0 @@
|
|||
|
||||
dbdir /srv/munin
|
||||
graph_strategy cgi
|
||||
cgiurl_graph /munin-cgi/munin-cgi-graph
|
||||
cgitmpdir /var/run/munin/cgi-tmp
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
dependencies:
|
||||
- {role: apache}
|
||||
- {role: epel_repo}
|
||||
- {role: powertools_repo}
|
|
@ -1,116 +0,0 @@
|
|||
---
|
||||
- name: Install packages
|
||||
ansible.builtin.package:
|
||||
name: munin
|
||||
state: installed
|
||||
|
||||
- name: Set file contexts for data directory
|
||||
community.general.sefcontext:
|
||||
path: "/export/munin(/.*)?"
|
||||
setype: munin_var_lib_t
|
||||
|
||||
- name: Create data direcory
|
||||
ansible.builtin.file:
|
||||
path: /export/munin
|
||||
state: directory
|
||||
mode: 0755
|
||||
owner: munin
|
||||
group: munin
|
||||
setype: _default
|
||||
|
||||
- name: Link data directory
|
||||
ansible.builtin.file:
|
||||
dest: /srv/munin
|
||||
src: /export/munin
|
||||
state: link
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
follow: false
|
||||
|
||||
# for some reason this is owned by adm default
|
||||
- name: Fix log directory group
|
||||
ansible.builtin.file:
|
||||
path: /var/log/munin
|
||||
state: directory
|
||||
mode: 0750
|
||||
owner: munin
|
||||
group: apache
|
||||
|
||||
- name: Add munin to hostkey group
|
||||
ansible.builtin.user:
|
||||
name: munin
|
||||
groups: hostkey
|
||||
append: true
|
||||
|
||||
# this needs better rule
|
||||
- name: Fix SELinux write errors
|
||||
ansible.posix.seboolean:
|
||||
name: domain_can_mmap_files
|
||||
state: true
|
||||
persistent: true
|
||||
|
||||
- name: Create apache config
|
||||
ansible.builtin.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
|
||||
community.general.sefcontext:
|
||||
path: "/var/run/munin/cgi-tmp(/.*)?"
|
||||
setype: munin_rw_content_t
|
||||
|
||||
- name: Add cache direcory to tmpfiles
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/tmpfiles.d/munin.conf
|
||||
src: munin-tmpfiles.conf
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
||||
- name: Create cache directory
|
||||
ansible.builtin.file:
|
||||
path: /var/run/munin/cgi-tmp
|
||||
state: directory
|
||||
mode: 0755
|
||||
owner: apache
|
||||
group: apache
|
||||
setype: _default
|
||||
|
||||
- name: Create tls config
|
||||
ansible.builtin.template:
|
||||
dest: /etc/munin/munin-conf.d/00-tls.conf
|
||||
src: tls.conf.j2
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
||||
- name: Create host config
|
||||
ansible.builtin.template:
|
||||
dest: /etc/munin/munin-conf.d/hosts.conf
|
||||
src: hosts.conf.j2
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
||||
- name: Create override config
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/munin/munin-conf.d/00-override.conf
|
||||
src: override.conf
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
||||
- name: Remove localhost node
|
||||
ansible.builtin.file:
|
||||
path: /etc/munin/munin-conf.d/local.conf
|
||||
state: absent
|
||||
|
||||
- name: Enable cron job
|
||||
ansible.builtin.systemd:
|
||||
name: munin.timer
|
||||
state: started
|
||||
enabled: true
|
|
@ -1,5 +0,0 @@
|
|||
{% for host in groups["all"] %}
|
||||
[{{ host }}]
|
||||
address {{ host }}
|
||||
use_node_name yes
|
||||
{% endfor %}
|
|
@ -1,5 +0,0 @@
|
|||
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
Reference in a new issue