Ansible_workstation/roles/nut/tasks/main.yml

30 lines
597 B
YAML

---
# 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='
line: MODE=netserver
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
- name: Copy upsd.conf
template:
src: upsd.conf.j2
dest: /etc/nut/upsd.conf
owner: root
group: root
mode: 0644
notify: restart nut-server