munin_node: Rename role

This commit is contained in:
Timo Makinen 2022-02-25 00:43:44 +00:00
parent 26c6aca8f7
commit c67990e462
8 changed files with 2 additions and 2 deletions

View file

@ -0,0 +1,9 @@
---
- name: restart munin-node
service:
name: "{{ munin_node_service }}"
state: restarted
- name: munin-node configure
shell: munin-node-configure --shell --remove-also 2> /dev/null | /bin/sh
notify: restart munin-node

View file

@ -0,0 +1,11 @@
---
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

View file

@ -0,0 +1,24 @@
---
- name: include OS-specific variables
include_vars: "{{ ansible_os_family }}.yml"
- name: install packages
package:
name: "{{ item }}"
state: installed
with_items: "{{ munin_node_packages }}"
- name: create config
template:
dest: /etc/munin/munin-node.conf
src: munin-node.conf.j2
mode: 0644
owner: root
group: "{{ ansible_wheel }}"
notify: munin-node configure
- name: enable service
service:
name: "{{ munin_node_service }}"
state: started
enabled: true

View file

@ -0,0 +1,33 @@
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

View file

@ -0,0 +1,6 @@
---
munin_node_logfile: /var/log/munin/munin-node.log
munin_node_service: munin_node
munin_node_packages:
- munin-node
- p5-Net-SSLeay

View file

@ -0,0 +1,4 @@
---
munin_node_logfile: /var/log/munin-node/munin-node.log
munin_node_service: munin-node
munin_node_packages: munin-node