ansible-edda/tasks/ups.yml

24 lines
411 B
YAML

- name: Install acpupsd
apt:
name: apcupsd
- name: Apcupsd configuration
copy:
src: ./root/etc/apcupsd/apcupsd.conf
dest: /etc/apcupsd/apcupsd.conf
mode: 0644
register: apcupsd_conf
- name: Enable/start apcupsd
systemd:
name: apcupsd
enabled: yes
state: started
- name: Restart apcupsd
systemd:
name: apcupsd
state: restarted
when:
apcupsd_conf is changed