munin-server: Add all hosts to munin from inventory
This commit is contained in:
parent
58c1add726
commit
6c4d42341c
2 changed files with 13 additions and 0 deletions
|
@ -64,6 +64,14 @@
|
|||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
||||
- name: create host config
|
||||
template:
|
||||
dest: /etc/munin/conf.d/hosts.conf
|
||||
src: hosts.conf.j2
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
||||
- name: create override config
|
||||
copy:
|
||||
dest: /etc/munin/conf.d/00-override.conf
|
||||
|
|
5
roles/munin-server/templates/hosts.conf.j2
Normal file
5
roles/munin-server/templates/hosts.conf.j2
Normal file
|
@ -0,0 +1,5 @@
|
|||
{% for host in groups["all"] %}
|
||||
[{{ host }}]
|
||||
address {{ host }}
|
||||
use_node_name yes
|
||||
{% endfor %}
|
Loading…
Add table
Reference in a new issue