40 lines
716 B
YAML
40 lines
716 B
YAML
---
|
|
# tasks file for ansible-role-nut
|
|
#
|
|
- name: Install Nut
|
|
ansible.builtin.package:
|
|
name: {{ nut_package_name }}
|
|
state: present
|
|
|
|
|
|
- name: Template ups.conf
|
|
ansible.builtin.template:
|
|
src: ups.conf.j2
|
|
dest: /etc/nut/ups.conf
|
|
owner: root
|
|
group: root
|
|
mode: 644
|
|
|
|
- name: Template upsd.conf
|
|
ansible.builtin.template:
|
|
src: upsd.conf.j2
|
|
dest: /etc/nut/upsd.conf
|
|
owner: root
|
|
group: nut
|
|
mode: 640
|
|
|
|
- name: Template upsmon.conf
|
|
ansible.builtin.template:
|
|
src: upsmon.conf.j2
|
|
dest: /etc/nut/upsmon.conf
|
|
owner: root
|
|
group: nut
|
|
mode: 640
|
|
|
|
- name: start and enable nut
|
|
ansible.builtin.service:
|
|
name: nut.target
|
|
state: started
|
|
enabled: true
|
|
|