This will unify all the handlers to use first uppercase letter for ansible-lint to stop complaining. I went through all `notify:` occurrences and fixed them by running ``` set TEXT "text_to_replace"; set REPLACEMENT "replacement_text"; git grep -rlz "$TEXT" . | xargs -0 sed -i "s/$TEXT/$REPLACEMENT/g" ``` Then I went through all the changes and removed the ones that wasn't expected to be changed. Fixes https://pagure.io/fedora-infrastructure/issue/12391 Signed-off-by: Michal Konecny <mkonecny@redhat.com>
61 lines
1.6 KiB
YAML
61 lines
1.6 KiB
YAML
---
|
|
|
|
- name: Install python-retask
|
|
ansible.builtin.package: name=python-retask state=present
|
|
tags:
|
|
- collectd
|
|
|
|
- name: Copy in /usr/local/bin/fcomm-queue-collectd
|
|
ansible.builtin.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
|
|
ansible.builtin.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
|
|
ansible.builtin.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
|
|
ansible.builtin.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
|
|
ansible.builtin.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
|