Add tags to collectd roles.

This commit is contained in:
Ralph Bean 2014-10-01 19:38:16 +00:00
parent 02eaf76319
commit 7781f66a8d
5 changed files with 38 additions and 0 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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