Expanded the UPS_monitoring to install NUT and configure the options. Port not yet accessible.
This commit is contained in:
4
roles/USV_monitoring/files/99_nut-serialups.rules
Normal file
4
roles/USV_monitoring/files/99_nut-serialups.rules
Normal file
@@ -0,0 +1,4 @@
|
||||
#This file is written by ansible. Manual changes will be reverted. 2.2018, pet
|
||||
|
||||
|
||||
KERNEL=="ttyS0", GROUP="nut"
|
||||
4
roles/USV_monitoring/files/nut.conf
Executable file
4
roles/USV_monitoring/files/nut.conf
Executable file
@@ -0,0 +1,4 @@
|
||||
#This file is written by ansible. Manual changes will be reverted. 2.2018, pet
|
||||
|
||||
#This is the master server for the UPS, all others should be netclient.
|
||||
MODE=netserver
|
||||
6
roles/USV_monitoring/files/ups.conf
Normal file
6
roles/USV_monitoring/files/ups.conf
Normal file
@@ -0,0 +1,6 @@
|
||||
#This file is written by ansible. Manual changes will be reverted. 2.2018, pet
|
||||
|
||||
[VSD1500]
|
||||
driver = riello_ser
|
||||
port = /dev/ttyS1
|
||||
desc = "Riello VSD 1500; RS-Components: 869-5016; bought: 1.2018"
|
||||
4
roles/USV_monitoring/files/upsd.conf
Normal file
4
roles/USV_monitoring/files/upsd.conf
Normal file
@@ -0,0 +1,4 @@
|
||||
#This file is written by ansible. Manual changes will be reverted. 2.2018, pet
|
||||
|
||||
LISTEN 192.168.86.116 3493
|
||||
LISTEN 127.0.0.1 3493
|
||||
10
roles/USV_monitoring/files/upsd.users
Normal file
10
roles/USV_monitoring/files/upsd.users
Normal file
@@ -0,0 +1,10 @@
|
||||
#This file is written by ansible. Manual changes will be reverted. 2.2018, pet
|
||||
|
||||
[monmaster]
|
||||
password = DorsAz4BK7XiMKDfPj
|
||||
upsmon master
|
||||
|
||||
|
||||
[monuser]
|
||||
password = sEfguPcZbn99qnnTUj
|
||||
upsmon slave
|
||||
3
roles/USV_monitoring/files/upsmon.conf
Normal file
3
roles/USV_monitoring/files/upsmon.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
#This file is written by ansible. Manual changes will be reverted. 2.2018, pet
|
||||
|
||||
MONITOR VSD1500@lxc-pet-01 1 monmaster DorsAz4BK7XiMKDfPj master
|
||||
@@ -0,0 +1,70 @@
|
||||
- name: Check NUT (Network UPS Tools) installation
|
||||
apt:
|
||||
update_cache: yes
|
||||
name: nut
|
||||
|
||||
- name: NUT mode - /etc/nut/nut.conf
|
||||
copy:
|
||||
dest: /etc/nut/nut.conf
|
||||
src: nut.conf
|
||||
owner: root
|
||||
group: nut
|
||||
mode: 0640
|
||||
backup: yes
|
||||
|
||||
- name: UPS conf - /etc/nut/ups.conf
|
||||
copy:
|
||||
dest: /etc/nut/ups.conf
|
||||
src: ups.conf
|
||||
owner: root
|
||||
group: nut
|
||||
mode: 0640
|
||||
backup: yes
|
||||
|
||||
- name: UPS ip:port - /etc/nut/upsd.conf
|
||||
copy:
|
||||
dest: /etc/nut/upsd.conf
|
||||
src: upsd.conf
|
||||
owner: root
|
||||
group: nut
|
||||
mode: 0640
|
||||
backup: yes
|
||||
|
||||
- name: NUT user - /etc/nut/upsd.users
|
||||
copy:
|
||||
dest: /etc/nut/upsd.users
|
||||
src: upsd.users
|
||||
owner: root
|
||||
group: nut
|
||||
mode: 0640
|
||||
backup: yes
|
||||
|
||||
- name: NUT monitoring - /etc/nut/upsmon.conf
|
||||
copy:
|
||||
dest: /etc/nut/upsmon.conf
|
||||
src: upsmon.conf
|
||||
owner: root
|
||||
group: nut
|
||||
mode: 0640
|
||||
backup: yes
|
||||
|
||||
#- name: Serial port configuration- /etc/udev/rules.d/99_nut-serialups.rules
|
||||
# copy:
|
||||
# dest: /etc/udev/rules.d/99_nut-serialups.rules
|
||||
# src: 99_nut-serialups.rules
|
||||
# owner: root
|
||||
# group: nut
|
||||
# mode: 0640
|
||||
# backup: yes
|
||||
#
|
||||
#- name: Force udev to reload Serialports
|
||||
# command: "udevadm control --reload-rules"
|
||||
#
|
||||
#- name: Force udev to reload Serialports
|
||||
# command: "udevadm trigger"
|
||||
|
||||
- name: Stop the upsd
|
||||
command: "upsd -c stop"
|
||||
|
||||
- name: Start the upsd
|
||||
command: upsd
|
||||
|
||||
Reference in New Issue
Block a user