41 lines
794 B
YAML
41 lines
794 B
YAML
- name: load distribution-specific values
|
|
include_vars: '{{ item }}'
|
|
with_first_found:
|
|
- '{{ ansible_distribution }}.yml'
|
|
- defaults.yml
|
|
tags:
|
|
- always
|
|
|
|
- name: ensure collectd is installed
|
|
package:
|
|
name: '{{ collectd_packages }}'
|
|
state: present
|
|
tags:
|
|
- install
|
|
|
|
- name: ensure collectd is configured
|
|
template:
|
|
src: collectd.conf.j2
|
|
dest: /etc/collectd.conf
|
|
mode: '0644'
|
|
notify:
|
|
- restart collectd
|
|
tags:
|
|
- collectd-config
|
|
|
|
- name: ensure collectd network plugin is configured
|
|
template:
|
|
src: collectd-network.conf.j2
|
|
dest: /etc/collectd.d/network.conf
|
|
mode: '0644'
|
|
notify:
|
|
- restart collectd
|
|
tags:
|
|
- collectd-config
|
|
- collectd-network
|
|
|
|
- name: ensure collectd starts at boot
|
|
service:
|
|
name: collectd
|
|
enabled: true
|