2024-09-13 04:56:15 +00:00
|
|
|
- name: Install NUT
|
|
|
|
apt:
|
|
|
|
update_cache: true
|
|
|
|
name:
|
|
|
|
- nut
|
|
|
|
- nut-client
|
|
|
|
- nut-server
|
|
|
|
|
|
|
|
- name: Configure ups.conf
|
|
|
|
template:
|
|
|
|
src: ups.conf
|
|
|
|
dest: /etc/nut/ups.conf
|
|
|
|
notify:
|
|
|
|
- Restart nut-server
|
|
|
|
- Restart nut-client
|
|
|
|
- Restart nut-monitor
|
|
|
|
|
|
|
|
- name: Configure upsmon.conf
|
|
|
|
template:
|
|
|
|
src: upsmon.conf
|
|
|
|
dest: /etc/nut/upsmon.conf
|
|
|
|
notify:
|
|
|
|
- Restart nut-server
|
|
|
|
- Restart nut-client
|
|
|
|
- Restart nut-monitor
|
|
|
|
|
|
|
|
- name: Configure upsd.conf
|
|
|
|
copy:
|
|
|
|
src: upsd.conf
|
|
|
|
dest: /etc/nut/upsd.conf
|
|
|
|
notify:
|
|
|
|
- Restart nut-server
|
|
|
|
- Restart nut-client
|
|
|
|
- Restart nut-monitor
|
|
|
|
|
|
|
|
- name: Configure nut.conf
|
|
|
|
copy:
|
|
|
|
src: nut.conf
|
|
|
|
dest: /etc/nut/nut.conf
|
|
|
|
notify:
|
|
|
|
- Restart nut-server
|
|
|
|
- Restart nut-client
|
|
|
|
- Restart nut-monitor
|
|
|
|
|
|
|
|
- name: Configure upsd.users
|
|
|
|
copy:
|
|
|
|
src: upsd.users
|
|
|
|
dest: /etc/nut/upsd.users
|
|
|
|
notify:
|
|
|
|
- Restart nut-server
|
|
|
|
- Restart nut-client
|
|
|
|
- Restart nut-monitor
|
2024-09-15 22:12:43 +00:00
|
|
|
|
|
|
|
- name: Configure NUT udev rules
|
|
|
|
template:
|
|
|
|
src: 62-nut-usbups.rules
|
|
|
|
dest: /etc/udev/rules.d/62-nut-usbups.rules
|
|
|
|
notify:
|
|
|
|
- Reload udev
|