1
0
Fork 0
home-stack-ansible/roles/nut-server/tasks/main.yml

59 lines
1.1 KiB
YAML

- 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
- name: Configure NUT udev rules
template:
src: 62-nut-usbups.rules
dest: /etc/udev/rules.d/62-nut-usbups.rules
notify:
- Reload udev