ansible/roles/collectd/fcomm-queue/tasks/main.yml
Ryan Lerch 62952df107 ansiblelint fixes-- fqcn[action-core] - file to ansible.builtin.file
Replaces many references to  file: with ansible.builtin.file

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 10:41:52 +10:00

61 lines
1.5 KiB
YAML

---
- name: Install python-retask
package: 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
ansible.builtin.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: ficfcomm_module
tags:
- collectd
- selinux
- name: Check to see if its even installed yet
shell: semodule -l | grep fi-collectd-fcomm | wc -l
register: ficfcomm_grep
check_mode: no
changed_when: "'0' in ficfcomm_grep.stdout"
tags:
- collectd
- selinux
- name: Install our fcomm collectd selinux module
command: semodule -i /usr/share/collectd/fi-collectd-fcomm.pp
when: ficfcomm_module is changed or ficfcomm_grep is 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