Files
fedora-infra_ansible/roles/collectd/server/tasks/main.yml
Aurélien Bompard 2042f4ee07 Fix installation of collectd server on RHEL9
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2025-07-03 08:58:50 +02: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