--- - name: Create collectd configuration dir become: true file: path: /etc/collectd/collectd.conf.d state: directory mode: 0755 #required first so that collectd will start even if the FQDN of the host doesnt' resovle - name: Create hostname config template: src: hostname.conf dest: /etc/collectd/collectd.conf.d/hostname.conf become: true - name: Install collectd apt: pkg: collectd state: present become: true - name: Create graphite config template: src: graphite.conf dest: /etc/collectd/collectd.conf.d/graphite.conf become: true notify: restart collectd - name: Create df config template: src: df.conf dest: /etc/collectd/collectd.conf.d/df.conf become: true notify: restart collectd - name: create delayed_job_postgres config template: src: delayed_job_postgres.conf dest: /etc/collectd/collectd.conf.d/delayed_job_postgres.conf become: true notify: restart collectd when: (collectd_pgdj is defined) or (postgresql_installed is defined and delayed_job_installed is defined) - name: create apache2 config template: src: apache2.conf dest: /etc/collectd/collectd.conf.d/apache2.conf become: true notify: restart collectd when: apache_installed is defined - name: create puma config template: src: puma-process.conf dest: /etc/collectd/collectd.conf.d/puma-process.conf become: true notify: restart collectd when: puma_installed is defined - name: create nodejs config template: src: nodejs-process.conf dest: /etc/collectd/collectd.conf.d/nodejs-process.conf become: true notify: restart collectd - name: create nginx config template: src: nginx.conf dest: /etc/collectd/collectd.conf.d/nginx.conf become: true notify: restart collectd when: nginx_installed is defined - name: create rails_lograge config template: src: rails_lograge.conf dest: /etc/collectd/collectd.conf.d/rails_lograge.conf become: true notify: restart collectd when: rails_lograge is defined