---

- name: Copy in /usr/local/bin/collectd-postgres.sh
  template: >
    src=collectd-postgres.sh
    dest=/usr/local/bin/collectd-postgres.sh
    mode=0755
  tags:
  - collectd
  notify: restart collectd

- name: Copy in /etc/collectd.d/postgres.conf
  template: >
    src=postgres.conf
    dest=/etc/collectd.d/postgres.conf
  tags:
  - collectd
  notify: restart collectd
