Files
configpolicy/roles/collectd-version/tasks/main.yml
Dustin C. Hatch a178dc4af9 r/collectd-version: Add OS version plugin
The `collectd-version` script uses the *collectd* UNIX socket to send
custom values to *collectd* to track the OS version.  Since these values
obviously cannot change while the system is running, the values are
specified with a very long interval.  This avoids having to continuously
insert the values, either with a long-running process or by repeatedly
running a script.  The values only need to be inserted once when
*collectd* starts.
2021-10-30 16:50:37 -05:00

33 lines
707 B
YAML

- name: ensure collectd-version script is installed
copy:
src: collectd-version.py
dest: /usr/local/libexec/collectd-version
mode: 'u=rwx,go=rx'
notify: restart collectd
tags:
- install
- name: ensure collectd-version.service systemd unit exists
copy:
src: collectd-version.service
dest: /etc/systemd/system/
mode: 'u=rw,go=rx'
notify:
- reload systemd
- restart collectd-version
tags:
- systemd
- name: ensure collectd-version service starts automatically
service:
name: collectd-version
enabled: true
tags:
- service
- name: ensure collectd-version service is started
service:
name: collectd-version
state: started
tags:
- service