munin_node: Rename role
This commit is contained in:
parent
26c6aca8f7
commit
c67990e462
8 changed files with 2 additions and 2 deletions
9
roles/munin_node/handlers/main.yml
Normal file
9
roles/munin_node/handlers/main.yml
Normal 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
|
11
roles/munin_node/meta/main.yml
Normal file
11
roles/munin_node/meta/main.yml
Normal 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
|
24
roles/munin_node/tasks/main.yml
Normal file
24
roles/munin_node/tasks/main.yml
Normal 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
|
33
roles/munin_node/templates/munin-node.conf.j2
Normal file
33
roles/munin_node/templates/munin-node.conf.j2
Normal 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
|
6
roles/munin_node/vars/OpenBSD.yml
Normal file
6
roles/munin_node/vars/OpenBSD.yml
Normal 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
|
4
roles/munin_node/vars/RedHat.yml
Normal file
4
roles/munin_node/vars/RedHat.yml
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue