ansible-personal/roles/munin/tasks/munin-node.yml
Alan Orth e343ddc9a6
Add 'packages' tag to any task doing package stuff
For idempotence we need to run all apt-related tasks, like editing
source files, adding keys, installing packages, etc, when running
the 'packages' tag.
2016-08-14 16:33:48 +03:00

31 lines
767 B
YAML

---
- name: Install munin-node
apt: name={{ item }} state=latest
when: ansible_os_family == "Ubuntu"
with_items:
- munin-node
tags: packages
# some nice things to have for munin-node on Ubuntu
- name: Install munin-node deps
when: ansible_os_family == "Ubuntu"
apt: name={{ item }} state=present
with_items:
- libwww-perl #for munin's nginx_status check
tags: packages
- 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: