Feat: enabe netserver for nut
This commit is contained in:
parent
38c4291b90
commit
558530e16e
@ -1,2 +1,8 @@
|
||||
---
|
||||
# defaults file for nut
|
||||
nut_mode: "standalone"
|
||||
|
||||
upss:
|
||||
- name: fooUps
|
||||
driver: usbhid-ups
|
||||
port: auto
|
||||
|
@ -7,7 +7,7 @@
|
||||
lineinfile:
|
||||
path: /etc/nut/nut.conf
|
||||
regexp: '^MODE='
|
||||
line: MODE=standalone
|
||||
line: MODE=netserver
|
||||
notify: restart nut-server
|
||||
|
||||
- name: Copy ups.conf
|
||||
@ -18,3 +18,12 @@
|
||||
group: root
|
||||
mode: 0644
|
||||
notify: restart nut-server
|
||||
|
||||
- name: Copy upsd.conf
|
||||
template:
|
||||
src: upsd.conf.j2
|
||||
dest: /etc/nut/upsd.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
notify: restart nut-server
|
||||
|
7
roles/nut/templates/upsd.conf.j2
Normal file
7
roles/nut/templates/upsd.conf.j2
Normal file
@ -0,0 +1,7 @@
|
||||
MAXAGE 3
|
||||
{% if nut_mode == "standalone" %}
|
||||
LISTEN 127.0.0.1 3493
|
||||
{% else %}
|
||||
LISTEN 0.0.0.0 3493
|
||||
{% endif %}
|
||||
MAXCONN 2
|
@ -13,10 +13,14 @@ pihole_docker_image: pihole/pihole:2022.05
|
||||
pihole_ip: 192.168.2.202
|
||||
|
||||
# Nut
|
||||
nut_mode: "netserver"
|
||||
upss:
|
||||
- name: eaton650
|
||||
driver: usbhid-ups
|
||||
port: auto
|
||||
vendorid: "0463"
|
||||
poductid: "FFFF"
|
||||
desc: "UPS bureau"
|
||||
|
||||
# minidlna
|
||||
minidlna_friendly_name: "Nas dlna"
|
||||
|
Loading…
Reference in New Issue
Block a user