Files
fedora-infra_ansible/roles/collectd/server/tasks/main.yml
Michal Konecny 2ec055db6f Use first uppercase letter for all handlers
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>
2025-02-10 20:31:49 +00:00

107 lines
2.4 KiB
YAML

---
# collectd server setup
# install pkg
- name: Install collectd server packages (rhel 7)
ansible.builtin.package: name={{ item }} state=present
with_items:
- collectd-rrdtool
- collectd-web
- collectd-rabbitmq-data
notify:
- Restart collectd
tags:
- config
- collectd/server
when: ansible_distribution_major_version|int == 7
- name: Install collectd server packages (rhel 8)
ansible.builtin.package: name={{ item }} state=present
with_items:
- collectd-rrdtool
- collectd-web
- collectd-rabbitmq-data
- collectd-ipa-data
notify:
- Restart collectd
tags:
- config
- collectd/server
when: ansible_distribution_major_version|int == 8
# install collectd types
- name: Install collectd types
ansible.builtin.copy:
src: "{{ item }}"
dest: /usr/share/collectd/{{ item }}
loop:
- fmn-types.db
notify:
- Restart collectd
tags:
- config
- collectd/server
# install collectd configs
- name: Install collectd config
ansible.builtin.copy:
src: "{{ item }}"
dest: /etc/collectd.d/{{ item }}
loop:
- rrdtool.conf
- fmn.conf
- unixsock.conf
notify:
- Restart collectd
tags:
- config
- collectd/server
# install apache config
- name: Install collectd apache config
ansible.builtin.copy: src=collectd.conf dest=/etc/httpd/conf.d/collectd.conf
tags:
- config
- collectd/server
# install upgrade target
- name: Install collect upgrade target to handle v4 clients
ansible.builtin.copy: src=vfive-upgrade.conf dest=/etc/collectd.d/vfive-upgrade.conf
tags:
- config
- collectd/server
# create /var/log/collectd as it's on a larger volume
- name: Create /var/log/collectd
ansible.builtin.file: path=/var/log/collectd owner=root group=root mode=0755 state=directory
tags:
- config
- collectd/server
# push our custom config file for the graph CGIs
- name: Push the collection.conf file
ansible.builtin.copy:
src: collection.conf
dest: /etc/collection.conf
tags:
- config
- collectd/server
- name: Create the service configuration directory
ansible.builtin.file:
path: /etc/systemd/system/collectd.service.d
state: directory
tags:
- config
- collectd/server
- name: Override the timeout for stopping collectd
ansible.builtin.copy:
src: service.timeout.conf
dest: /etc/systemd/system/collectd.service.d/timeout.conf
notify:
- Reload systemd
tags:
- config
- collectd/server