36 lines
592 B
YAML
36 lines
592 B
YAML
- name: ensure nut-client is installed
|
|
package:
|
|
name: nut-client
|
|
state: present
|
|
tags:
|
|
- install
|
|
|
|
- name: ensure upsmon is configured
|
|
template:
|
|
src: upsmon.conf.j2
|
|
dest: /etc/ups/upsmon.conf
|
|
owner: root
|
|
group: nut
|
|
mode: u=rw,g=r,o=
|
|
notify:
|
|
- restart nut-monitor
|
|
tags:
|
|
- config
|
|
|
|
- name: flush handlers
|
|
meta: flush_handlers
|
|
|
|
- name: ensure nut-monitor is running
|
|
service:
|
|
name: nut-monitor
|
|
state: started
|
|
tags:
|
|
- service
|
|
|
|
- name: ensure nut-monitor starts at boot
|
|
service:
|
|
name: nut-monitor
|
|
enabled: true
|
|
tags:
|
|
- service
|