diff --git a/ansible/install/group_vars/all b/ansible/install/group_vars/all index 6fab523b0..818461337 100644 --- a/ansible/install/group_vars/all +++ b/ansible/install/group_vars/all @@ -8,15 +8,21 @@ dns_server: 8.8.8.8 # Collectd interval (seconds) collectd_interval: 10 + +# Run collectd on the compute nodes +collectd_compute: false + # epel Repository for collectd packages epel_repo: https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm # Graphite Server ip address (Collectd -> Graphite server) graphite_host: 1.1.1.1 # Graphite prefix / Cloud name used both with graphite and grafana dashboards + graphite_prefix: openstack # Grafana API Key (Used to upload Grafana dashboards) grafana_api_key: (Your Grafana API Key) + # Grafana Server IP Address (Can be hosted on the Graphite server) grafana_host: 1.1.1.1 diff --git a/ansible/install/roles/collectd/tasks/main.yml b/ansible/install/roles/collectd/tasks/main.yml index f6381f60d..0f2a2d6f1 100644 --- a/ansible/install/roles/collectd/tasks/main.yml +++ b/ansible/install/roles/collectd/tasks/main.yml @@ -40,6 +40,15 @@ - name: Setup collectd service service: name=collectd state=restarted enabled=yes + when: "'controller' in group_names" + +- name: Setup collectd service + service: name=collectd state=restarted enabled=yes + when: "'compute in group_names' and collectd_compute" + +- name: Stop collectd service + service: name=collectd state=stopped + when: "'compute in group_names' and not collectd_compute" # # Configure selinux bits