2024-01-10 07:11:16 -05:00
|
|
|
# File configured by Ansible playbook
|
2024-01-11 00:15:16 -05:00
|
|
|
# Reference documentation:
|
|
|
|
# https://networkupstools.org/docs/man/upsmon.conf.html
|
2024-01-10 07:11:16 -05:00
|
|
|
|
|
|
|
{% for ups in nut_client_ups_devices %}
|
|
|
|
{% if ups.type == 'primary' %}
|
|
|
|
MONITOR {{ ups.name }}@{{ ups.host | default('localhost') }}:{{ ups.port | default(3493) }} {{ ups.powervalue | default('1') }} {{ nut_client_primary_username }} {{ nut_client_primary_password }} primary
|
|
|
|
{% elif ups.type == 'secondary' %}
|
|
|
|
MONITOR {{ ups.name }}@{{ ups.host | default('localhost') }}:{{ ups.port | default(3493) }} {{ ups.powervalue | default('1') }} {{ nut_client_secondary_username }} {{ nut_client_secondary_password }} secondary
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
FINALDELAY {{ nut_client_final_delay | default('5') }}
|
|
|
|
NOCOMMWARNTIME 300
|
|
|
|
RBWARNTIME 43200
|
|
|
|
OFFDURATION 30
|
|
|
|
SHUTDOWNCMD "{{ nut_client_shutdown_cmd | default('/usr/bin/poweroff') }}"
|
|
|
|
SHUTDOWNEXIT {{ nut_client_shutdown_exit | default('true') }}
|
|
|
|
POWERDOWNFLAG "/etc/killpower"
|
|
|
|
DEADTIME 15
|
|
|
|
HOSTSYNC {{ nut_client_hostsync | default('30') }}
|
|
|
|
POLLFREQALERT 5
|
|
|
|
POLLFREQ 5
|
|
|
|
MINSUPPLIES {{ nut_client_min_supplies | default('1') }}
|
2024-01-11 00:15:16 -05:00
|
|
|
CERTPATH /etc/ssl/certs
|
2024-01-10 07:11:16 -05:00
|
|
|
FORCESSL 1
|
|
|
|
CERTVERIFY 1
|
2024-01-11 00:15:16 -05:00
|
|
|
NOTIFYCMD "{{ nut_client_notify_cmd | default('/usr/bin/notify-send') }}"
|
|
|
|
{% for message in (nut_client_notify_messages | default([])) %}
|
2024-01-10 07:11:16 -05:00
|
|
|
NOTIFYMSG {{ message.name }} {{ message.message }}
|
|
|
|
{% endfor %}
|
2024-01-11 00:15:16 -05:00
|
|
|
{% for notify in (nut_client_notify_flags | default([])) %}
|
2024-01-10 07:11:16 -05:00
|
|
|
NOTIFYFLAG {{ notify.name }} {{ notify.flags }}
|
|
|
|
{% endfor %}
|