Compare commits
No commits in common. "areas" and "master" have entirely different histories.
|
|
@ -21,15 +21,15 @@
|
|||
- src: munin.conf.j2
|
||||
dest: /etc/munin/munin.conf
|
||||
- src: hosts.conf.j2
|
||||
dest: "{{ munin_conf_d_directory }}/hosts-{{ munin_hosts_area }}.conf"
|
||||
dest: "{{ munin_conf_d_directory }}/hosts.conf"
|
||||
|
||||
#- name: Create munin user via htpasswd.
|
||||
# htpasswd:
|
||||
# create: true
|
||||
# name: "{{ munin_admin_user }}"
|
||||
# password: "{{ munin_admin_password }}"
|
||||
# path: /etc/munin/munin-htpasswd
|
||||
# state: absent
|
||||
- name: Create munin user via htpasswd.
|
||||
htpasswd:
|
||||
create: true
|
||||
name: "{{ munin_admin_user }}"
|
||||
password: "{{ munin_admin_password }}"
|
||||
path: /etc/munin/munin-htpasswd
|
||||
state: present
|
||||
|
||||
- name: Enable or disable the munin cron job.
|
||||
lineinfile:
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
# Munin hosts.
|
||||
{% for host in groups[munin_hosts] %}
|
||||
{% if host != inventory_hostname %}
|
||||
[{{ host }}]
|
||||
address {{ hostvars[host]['ansible_default_ipv4']['address'] }}
|
||||
use_node_name yes
|
||||
{% endif %}
|
||||
{% for host in munin_hosts %}
|
||||
[{{ host.name }}]
|
||||
address {{ host.address }}
|
||||
{% if host.extra is defined %}
|
||||
{% for extra in host.extra %}
|
||||
{{ extra }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
# Munin hosts.
|
||||
{% for host in munin_hosts %}
|
||||
[{{ hostvars[host]['ansible_fqdn'] }}]
|
||||
address {{ hostvars[host]['ansible_default_ipv4']['address'] }}
|
||||
use_node_name yes
|
||||
{% endfor %}
|
||||
|
|
@ -89,6 +89,3 @@ contact.{{ contact.name }}.always_send {{ contact.level }}
|
|||
#contact.nagios.command /usr/bin/send_nsca nagios.host.comm -c /etc/nsca.conf
|
||||
|
||||
# Hosts are defined separately, in {{ munin_includedir }}
|
||||
[{{ inventory_hostname }}]
|
||||
address 127.0.0.1
|
||||
use_node_name yes
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
munin_conf_d_directory: /etc/munin/munin-conf.d
|
||||
|
||||
#munin_htmldir: /var/cache/munin/www
|
||||
munin_htmldir: /var/cache/munin/www
|
||||
|
||||
munin_includedir: /etc/munin/munin-conf.d
|
||||
|
|
|
|||
Loading…
Reference in New Issue