6
roles/munin/tasks/main.yml
Normal file
6
roles/munin/tasks/main.yml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
- include: munin.yml
|
||||
tags: munin
|
||||
|
||||
- include: munin-node.yml
|
||||
tags: munin-node
|
27
roles/munin/tasks/munin-node.yml
Normal file
27
roles/munin/tasks/munin-node.yml
Normal file
@ -0,0 +1,27 @@
|
||||
---
|
||||
- name: Install munin-node
|
||||
action: "{{ ansible_pkg_mgr }} name={{ item }} state=latest"
|
||||
with_items:
|
||||
- munin-node
|
||||
|
||||
# some nice things to have for munin-node on Ubuntu
|
||||
- name: Install munin-node deps
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
apt: name={{ item }} state=present
|
||||
with_items:
|
||||
- libwww-perl #for munin's nginx_status check
|
||||
|
||||
- name: Create munin-node.conf
|
||||
template: src=munin-node.conf.j2 dest=/etc/munin/munin-node.conf
|
||||
notify:
|
||||
- restart munin-node
|
||||
|
||||
- name: Configure munin-node
|
||||
shell: munin-node-configure --shell --families=contrib,auto | sh -x
|
||||
notify:
|
||||
- restart munin-node
|
||||
|
||||
- name: Start munin-node
|
||||
service: name=munin-node state=started enabled=true
|
||||
|
||||
# vim: set ts=2 sw=2:
|
10
roles/munin/tasks/munin.yml
Normal file
10
roles/munin/tasks/munin.yml
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
- name: Install munin package
|
||||
action: "{{ ansible_pkg_mgr }} name={{ item }} state=latest"
|
||||
with_items:
|
||||
- munin
|
||||
|
||||
- name: Create munin configuration file
|
||||
template: src=munin.conf.j2 dest=/etc/munin/munin.conf owner=root group=root mode=0644
|
||||
|
||||
# vim: set ts=2 sw=2:
|
Reference in New Issue
Block a user