configpolicy/roles/collectd-nut/tasks/main.yml

27 lines
521 B
YAML

- name: ensure collectd nut plugin is installed
package:
name: collectd-nut
state: present
tags:
- install
- name: ensure collectd nut plugin is configured
template:
src: collectd-nut.conf.j2
dest: /etc/collectd.d/nut.conf
mode: u=rw,go=r
notify:
- restart collectd
tags:
- collectd-config
- name: ensure collectd is allowed to connect to nut
seboolean:
name: collectd_tcp_network_connect
state: true
persistent: true
notify:
- restart collectd
tags:
- selinux