2022-09-11 20:55:30 +02:00
|
|
|
- name: Install acpupsd
|
|
|
|
apt:
|
|
|
|
name: apcupsd
|
|
|
|
|
|
|
|
- name: Apcupsd configuration
|
|
|
|
copy:
|
2022-09-22 23:01:27 +02:00
|
|
|
src: ./filesystem/{{ ansible_hostname }}/etc/apcupsd/apcupsd.conf
|
2022-09-11 20:55:30 +02:00
|
|
|
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
|