---
# collectd server setup 

# install pkg
- name: install collectd server packages
  yum: name={{ item }} state=present
  with_items: 
  - collectd-rrdtool
  - collectd-ping
  - collectd-web
  tags:
  - config
  - collectd/server

# install collectd ping config
- name: install collectd ping config
  copy: src=ping.conf dest=/etc/collectd.d/ping.conf
  notify:
  - restart collectd
  tags:
  - config
  - collectd/server

# install collectd rrd config
- name: install collectd rrd config
  copy: src=rrdtool.conf dest=/etc/collectd.d/rrdtool.conf
  notify:
  - restart collectd
  tags:
  - config
  - collectd/server

# install apache config
- name: install collectd apache config
  copy: src=collectd.conf dest=/etc/httpd/conf.d/collectd.conf
  tags:
  - config
  - collectd/server

# install upgrade target
- name: install collect upgrade target to handle v4 clients
  copy: src=vfive-upgrade.conf dest=/etc/collectd.d/vfive-upgrade.conf
  tags: 
  - config
  - collectd/server
