Compare commits

..

No commits in common. "areas" and "master" have entirely different histories.

5 changed files with 18 additions and 24 deletions

View File

@ -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-{{ munin_hosts_area }}.conf" dest: "{{ munin_conf_d_directory }}/hosts.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: absent state: present
- name: Enable or disable the munin cron job. - name: Enable or disable the munin cron job.
lineinfile: lineinfile:

View File

@ -1,8 +1,11 @@
# Munin hosts. # Munin hosts.
{% for host in groups[munin_hosts] %} {% for host in munin_hosts %}
{% if host != inventory_hostname %} [{{ host.name }}]
[{{ host }}] address {{ host.address }}
address {{ hostvars[host]['ansible_default_ipv4']['address'] }} {% if host.extra is defined %}
use_node_name yes {% for extra in host.extra %}
{% endif %} {{ extra }}
{% endfor %}
{% endif %}
{% endfor %} {% endfor %}

View File

@ -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 %}

View File

@ -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 #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

View File

@ -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