fix: add udev rules
This commit is contained in:
parent
2727c102b9
commit
7cda1e26c3
@ -27,3 +27,6 @@ nut_upsmon_extra: |
|
|||||||
RBWARNTIME 43200
|
RBWARNTIME 43200
|
||||||
NOCOMMWARNTIME 300
|
NOCOMMWARNTIME 300
|
||||||
FINALDELAY 5
|
FINALDELAY 5
|
||||||
|
|
||||||
|
nut_manufacturer_id: "0463"
|
||||||
|
nut_product_id: ffff
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
#
|
#
|
||||||
- name: Install Nut
|
- name: Install Nut
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: {{ nut_package_name }}
|
name:
|
||||||
|
- "{{ nut_package_name }}"
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
|
|
||||||
@ -31,6 +32,21 @@
|
|||||||
group: nut
|
group: nut
|
||||||
mode: 640
|
mode: 640
|
||||||
|
|
||||||
|
- name: Create udev rules
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: udev/50-ups.rules.j2
|
||||||
|
dest: /etc/udev/rules.d/50-ups.rules
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 640
|
||||||
|
|
||||||
|
|
||||||
|
- name: start and enable nut-driver-enumerator
|
||||||
|
ansible.builtin.service:
|
||||||
|
name: nut-driver-enumerator.service
|
||||||
|
state: started
|
||||||
|
enabled: true
|
||||||
|
|
||||||
- name: start and enable nut
|
- name: start and enable nut
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
name: nut.target
|
name: nut.target
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{% for ups in nut_ups %}
|
{% for ups in nut_ups %}
|
||||||
MONITOR {{ ups.name }}@localhost
|
MONITOR {{ ups.name }}@localhost 1
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user