Compare commits
1 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
743b1cc15f |
|
|
@ -21,15 +21,15 @@
|
||||||
- src: munin.conf.j2
|
- src: munin.conf.j2
|
||||||
dest: /etc/munin/munin.conf
|
dest: /etc/munin/munin.conf
|
||||||
- src: hosts.conf.j2
|
- src: hosts.conf.j2
|
||||||
dest: "{{ munin_conf_d_directory }}/hosts.conf"
|
dest: "{{ munin_conf_d_directory }}/hosts-{{ munin_hosts_area }}.conf"
|
||||||
|
|
||||||
- name: Create munin user via htpasswd.
|
#- name: Create munin user via htpasswd.
|
||||||
htpasswd:
|
# htpasswd:
|
||||||
create: true
|
# create: true
|
||||||
name: "{{ munin_admin_user }}"
|
# name: "{{ munin_admin_user }}"
|
||||||
password: "{{ munin_admin_password }}"
|
# password: "{{ munin_admin_password }}"
|
||||||
path: /etc/munin/munin-htpasswd
|
# path: /etc/munin/munin-htpasswd
|
||||||
state: present
|
# state: absent
|
||||||
|
|
||||||
- name: Enable or disable the munin cron job.
|
- name: Enable or disable the munin cron job.
|
||||||
lineinfile:
|
lineinfile:
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,8 @@
|
||||||
# Munin hosts.
|
# Munin hosts.
|
||||||
{% for host in munin_hosts %}
|
{% for host in groups[munin_hosts] %}
|
||||||
[{{ host.name }}]
|
{% if host != inventory_hostname %}
|
||||||
address {{ host.address }}
|
[{{ host }}]
|
||||||
{% if host.extra is defined %}
|
address {{ hostvars[host]['ansible_default_ipv4']['address'] }}
|
||||||
{% for extra in host.extra %}
|
use_node_name yes
|
||||||
{{ extra }}
|
{% endif %}
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
# Munin hosts.
|
||||||
|
{% for host in munin_hosts %}
|
||||||
|
[{{ hostvars[host]['ansible_fqdn'] }}]
|
||||||
|
address {{ hostvars[host]['ansible_default_ipv4']['address'] }}
|
||||||
|
use_node_name yes
|
||||||
|
{% endfor %}
|
||||||
|
|
@ -89,3 +89,6 @@ contact.{{ contact.name }}.always_send {{ contact.level }}
|
||||||
#contact.nagios.command /usr/bin/send_nsca nagios.host.comm -c /etc/nsca.conf
|
#contact.nagios.command /usr/bin/send_nsca nagios.host.comm -c /etc/nsca.conf
|
||||||
|
|
||||||
# Hosts are defined separately, in {{ munin_includedir }}
|
# 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_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
|
munin_includedir: /etc/munin/munin-conf.d
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue