31 lines
510 B
YAML
31 lines
510 B
YAML
---
|
|
# tasks file for collectd
|
|
|
|
- name: Install collectd
|
|
apt:
|
|
name: collectd-core
|
|
state: present
|
|
|
|
- name: Make config dir
|
|
file:
|
|
path: "/etc/collectd/"
|
|
state: directory
|
|
|
|
- name: Copy dtypes.db
|
|
copy:
|
|
src: types.db
|
|
dest: /usr/share/collectd/types.db
|
|
|
|
- name: Feed config
|
|
template:
|
|
src: collectd.conf.j2
|
|
dest: /etc/collectd/collectd.conf
|
|
mode: 644
|
|
notify:
|
|
- Restart collectd
|
|
|
|
- name: Enable collectd service
|
|
systemd:
|
|
name: "collectd.service"
|
|
enabled: yes
|