From 7781f66a8d81b44331e5eb845ea665170aef949e Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Wed, 1 Oct 2014 19:38:16 +0000 Subject: [PATCH] Add tags to collectd roles. --- roles/collectd/base/tasks/main.yml | 20 ++++++++++++++++++++ roles/collectd/fcomm-queue/tasks/main.yml | 6 ++++++ roles/collectd/fedmsg-service/tasks/main.yml | 4 ++++ roles/collectd/postgres/tasks/main.yml | 4 ++++ roles/collectd/web-service/tasks/main.yml | 4 ++++ 5 files changed, 38 insertions(+) diff --git a/roles/collectd/base/tasks/main.yml b/roles/collectd/base/tasks/main.yml index 476d701992..6d3e622a68 100644 --- a/roles/collectd/base/tasks/main.yml +++ b/roles/collectd/base/tasks/main.yml @@ -4,20 +4,28 @@ # install pkg - name: install collectd yum: name=collectd state=installed + tags: + - collectd # enable collectd - name: enable collectd svc service: state=running enabled=true name=collectd + tags: + - collectd # install collected.conf - name: /etc/collectd.conf template: src=collectd.conf.j2 dest=/etc/collectd.conf + tags: + - collectd notify: - restart collectd # install collectd-network config - name: /etc/collectd.d/network.conf copy: src=network-client.conf dest=/etc/collectd.d/network.conf + tags: + - collectd notify: - restart collectd when: not inventory_hostname.startswith('log') @@ -25,6 +33,8 @@ # install collectd-network config - name: /etc/collectd.d/network.conf copy: src=network-server.conf dest=/etc/collectd.d/network.conf + tags: + - collectd notify: - restart collectd when: inventory_hostname.startswith('log') @@ -32,12 +42,16 @@ # apache - localhost only - pretty much any apache server - name: install collectd-apache yum: state=installed name=collectd-apache + tags: + - collectd notify: - restart collectd when: collectd_apache is defined - name: /etc/collectd/apache.conf copy: src=apache.conf dest=/etc/collectd.d/apache.conf + tags: + - collectd notify: - restart collectd when: collectd_apache is defined @@ -46,14 +60,20 @@ # Three tasks for handling our custom selinux module - name: ensure a directory exists for our custom selinux module file: dest=/usr/share/collectd state=directory + tags: + - collectd - name: copy over our custom selinux module copy: src=selinux/fi-collectd.pp dest=/usr/share/collectd/fi-collectd.pp register: selinux_module + tags: + - collectd - name: install our custom selinux module command: semodule -i /usr/share/collectd/fi-collectd.pp when: selinux_module|changed + tags: + - collectd diff --git a/roles/collectd/fcomm-queue/tasks/main.yml b/roles/collectd/fcomm-queue/tasks/main.yml index dbab5b5079..6539213199 100644 --- a/roles/collectd/fcomm-queue/tasks/main.yml +++ b/roles/collectd/fcomm-queue/tasks/main.yml @@ -2,16 +2,22 @@ - name: install python-retask yum: name=python-retask state=installed + tags: + - collectd - name: Copy in /usr/local/bin/fcomm-queue-collectd copy: > src=fcomm-queue-collectd.py dest=/usr/local/bin/fcomm-queue-collectd mode=0755 + tags: + - collectd notify: restart collectd - name: Copy in /etc/collectd.d/fcomm-queue.conf copy: > src=fcomm-queue.conf dest=/etc/collectd.d/fcomm-queue-conf + tags: + - collectd notify: restart collectd diff --git a/roles/collectd/fedmsg-service/tasks/main.yml b/roles/collectd/fedmsg-service/tasks/main.yml index 524b822a57..12c642b872 100644 --- a/roles/collectd/fedmsg-service/tasks/main.yml +++ b/roles/collectd/fedmsg-service/tasks/main.yml @@ -5,10 +5,14 @@ src=fedmsg-service-collectd.py dest="/usr/local/bin/fedmsg-service-collectd-{{ process }}" mode=0755 + tags: + - collectd notify: restart collectd - name: Copy in /etc/collectd.d/fedmsg-service.conf template: > src=fedmsg-service.conf dest=/etc/collectd.d/{{ process }}.conf + tags: + - collectd notify: restart collectd diff --git a/roles/collectd/postgres/tasks/main.yml b/roles/collectd/postgres/tasks/main.yml index 9a6ac2b3bf..ea87dc925a 100644 --- a/roles/collectd/postgres/tasks/main.yml +++ b/roles/collectd/postgres/tasks/main.yml @@ -5,10 +5,14 @@ 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 diff --git a/roles/collectd/web-service/tasks/main.yml b/roles/collectd/web-service/tasks/main.yml index a98edc42cb..aafcfacd36 100644 --- a/roles/collectd/web-service/tasks/main.yml +++ b/roles/collectd/web-service/tasks/main.yml @@ -5,10 +5,14 @@ src=web-service-collectd.py dest="/usr/local/bin/web-service-collectd-{{ site }}" mode=0755 + tags: + - collectd notify: restart collectd - name: Copy in /etc/collectd.d/web-service.conf template: > src=web-service.conf dest=/etc/collectd.d/{{ site }}.conf + tags: + - collectd notify: restart collectd