2022-06-03 03:39:23 +00:00
|
|
|
---
|
|
|
|
# tasks file for nut
|
|
|
|
- name: Install os-specific packages
|
|
|
|
include_tasks: "{{ ansible_os_family | lower }}.yml"
|
|
|
|
|
|
|
|
- name: Enable standalone mode for Nut
|
|
|
|
lineinfile:
|
|
|
|
path: /etc/nut/nut.conf
|
|
|
|
regexp: '^MODE='
|
2022-12-03 09:06:05 +00:00
|
|
|
line: MODE=netserver
|
2022-06-03 03:39:23 +00:00
|
|
|
notify: restart nut-server
|
|
|
|
|
|
|
|
- name: Copy ups.conf
|
|
|
|
template:
|
|
|
|
src: ups.conf.j2
|
|
|
|
dest: /etc/nut/ups.conf
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
notify: restart nut-server
|
2022-12-03 09:06:05 +00:00
|
|
|
|
|
|
|
- name: Copy upsd.conf
|
|
|
|
template:
|
|
|
|
src: upsd.conf.j2
|
|
|
|
dest: /etc/nut/upsd.conf
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
notify: restart nut-server
|