Files
fedora-infra_ansible/roles/collectd/fcomm-queue/tasks/main.yml
2014-11-17 14:38:11 +00:00

73 lines
1.6 KiB
YAML

---
- name: install python-retask
yum: name=python-retask state=present
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
# 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
- selinux
- name: copy over our fcomm collectd selinux module
copy: src=selinux/fi-collectd-fcomm.pp dest=/usr/share/collectd/fi-collectd-fcomm.pp
register: selinux_module
tags:
- collectd
- selinux
- name: check to see if its even installed yet
shell: semodule -l | grep fi-collectd-fcomm
register: selinux_grep
always_run: True
changed_when: selinux_grep.rc == 1
ignore_errors: True
tags:
- collectd
- selinux
- debug: var=selinux_grep
tags:
- collectd
- selinux
- debug: msg="{{selinux_grep|changed}}"
tags:
- collectd
- selinux
- name: install our fcomm collectd selinux module
command: semodule -i /usr/share/collectd/fi-collectd-fcomm.pp
when: selinux_module|changed or selinux_grep|changed
tags:
- collectd
- selinux
- name: lastly, set some selinux booleans
seboolean: name={{item}} persistent=yes state=yes
with_items:
- collectd_tcp_network_connect
tags:
- collectd
- selinux