nut LISTEN ip

main
Ricard Illa 2023-01-25 18:15:16 +01:00
parent f01821b3a9
commit cc1a43322e
2 changed files with 6 additions and 6 deletions

View File

@ -223,8 +223,6 @@ all:
nut_host: localhost
nut_listen: "10.0.0.0/24"
caladan:
ansible_host: caladan
ansible_user: ansible

View File

@ -27,11 +27,13 @@
password = "{{ nut_upsmon_password }}"
upsmon {{ nut_types[nut_mode] }}
- name: add LISTEN line to /etc/nut/upsd.conf
lineinfile:
- name: allow NUT to listen to all IPs
blockinfile:
path: /etc/nut/upsd.conf
regexp: '^LISTEN'
line: "LISTEN {{ nut_listen }}"
block: |
LISTEN 0.0.0.0
LISTEN ::1
when: nut_mode == "netserver"
- name: start and enable nut-upsd
service: