Einbau neue USV (#325)
Co-authored-by: Michael Grote <michael.grote@posteo.de> Reviewed-on: mg/ansible#325 Co-authored-by: mg <michael.grote@posteo.de> Co-committed-by: mg <michael.grote@posteo.de>
This commit is contained in:
parent
4cbb5d7aac
commit
5c8c608ab4
4 changed files with 62 additions and 63 deletions
|
@ -93,8 +93,30 @@
|
||||||
env.client /usr/bin/fail2ban-client
|
env.client /usr/bin/fail2ban-client
|
||||||
env.config_dir /etc/fail2ban
|
env.config_dir /etc/fail2ban
|
||||||
user root
|
user root
|
||||||
|
- name: apcupsd_ww
|
||||||
|
src: https://git.mgrote.net/mg/mirror-munin-contrib/raw/branch/master/plugins/power/apcupsd_ww
|
||||||
|
- name: apcupsd_pwr
|
||||||
|
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/apcupsd_pwr
|
||||||
|
config: |
|
||||||
|
[apcupsd_pwr]
|
||||||
|
env.ups_model APC-BX950U-GR
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### mgrote.apt_manage_sources
|
### mgrote.apt_manage_sources
|
||||||
manage_sources_apt_proxy: ""
|
manage_sources_apt_proxy: ""
|
||||||
# Ansible Variablen
|
# Ansible Variablen
|
||||||
### sudo
|
### sudo
|
||||||
sudo: false
|
sudo: false
|
||||||
|
|
||||||
|
### mgrote.apcupsd
|
||||||
|
apcupsd_master_onbatterydelay: 10
|
||||||
|
apcupsd_master_batterylevel_for_shutdown: 50
|
||||||
|
apcupsd_master_minutes_for_shutdown: 10
|
||||||
|
apcupsd_master_nologon_when_active: "disable"
|
||||||
|
|
||||||
|
apcupsd_nis_master: true
|
||||||
|
apcupsd_nis_master_hostname: pve2.grote.lan
|
||||||
|
apcupsd_nis_master_listen_ip: 0.0.0.0
|
||||||
|
apcupsd_nis_master_listen_port: 3551
|
||||||
|
apcupsd_ups_name: APC-BX950U-GR
|
||||||
|
|
|
@ -21,3 +21,5 @@
|
||||||
tags: "r8152" }
|
tags: "r8152" }
|
||||||
- { role: mgrote.proxmox_bind_mounts,
|
- { role: mgrote.proxmox_bind_mounts,
|
||||||
tags: "bindmounts" }
|
tags: "bindmounts" }
|
||||||
|
- { role: mgrote.apcupsd,
|
||||||
|
tags: "apcupsd" }
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
### Beschreibung
|
### Beschreibung
|
||||||
* Installiert apcupsd.
|
* Installiert apcupsd.
|
||||||
* Auf einem PC als "Master", hier ist die USV per USB angeschlossen.
|
* Auf einem PC als "Master", hier ist die USV per USB angeschlossen.
|
||||||
* Auf allen anderen PCs als "Slave", diese OCs pollen alle n Sekunden den Master.
|
* Auf allen anderen PCs als "Slave", diese OCs pollen alle <n> Sekunden den Master.
|
||||||
* Benoetigt mgrote.postfix.
|
* Benoetigt mgrote.postfix.
|
||||||
* Getestet mit: APC-BX950U-GR
|
* Getestet mit: APC-BX950U-GR
|
||||||
|
|
||||||
|
@ -14,55 +14,7 @@
|
||||||
|
|
||||||
### getestet auf
|
### getestet auf
|
||||||
- [x] ProxMox 6.1
|
- [x] ProxMox 6.1
|
||||||
|
- [x] ProxMox 7
|
||||||
|
|
||||||
### Variablen + Defaults
|
### Variablen + Defaults
|
||||||
##### Zeitspanne in Sekunden, ab der der Systemdienst einen Stromausfall annimmt. Nuetzlich, um sehr kurze Ausfaelle ignorieren zu koennen. Jeweils Master und Slave.
|
- siehe [defaults/main.yml](./defaults/main.yml)
|
||||||
```yaml
|
|
||||||
apcupsd_master_onbatterydelay: 10
|
|
||||||
apcupsd_slave_onbatterydelay: 10
|
|
||||||
```
|
|
||||||
##### Durch die USV gemeldete Restkapazitaet in Prozent, ab der der Rechner heruntergefahren wird. Jeweils Master und Slave.
|
|
||||||
```yaml
|
|
||||||
apcupsd_master_batterylevel_for_shutdown: 50
|
|
||||||
apcupsd_slave_batterylevel_for_shutdown: 60
|
|
||||||
```
|
|
||||||
##### apcupsd will shutdown the system during a power failure when the remaining runtime on batteries as internally calculated by the UPS falls below the specified minutes. Jeweils Master und Slave.
|
|
||||||
```yaml
|
|
||||||
apcupsd_master_minutes_for_shutdown: 10
|
|
||||||
apcupsd_slave_minutes_for_shutdown: 11
|
|
||||||
```
|
|
||||||
##### Specifies when apcupsd should create the NOLOGON file to prevent users from logging on to the system. Jeweils Master und Slave.
|
|
||||||
```yaml
|
|
||||||
apcupsd_master_nologon_when_active: always
|
|
||||||
apcupsd_slave_nologon_when_active: always
|
|
||||||
```
|
|
||||||
|
|
||||||
##### Ist der Server MASTER, also ist die USV an diesem Computer angeschlossen, kann nur für einen PC "true" sein. Jeweils Master und Slave.
|
|
||||||
```yaml
|
|
||||||
apcupsd_nis_master: "true"
|
|
||||||
```
|
|
||||||
|
|
||||||
##### Wenn "true" ist dieser Host master, für alle anderen "false", das muss nicht explizit gesetzt werden.
|
|
||||||
```yaml
|
|
||||||
apcupsd_nis_master: on
|
|
||||||
```
|
|
||||||
|
|
||||||
##### FQDN oder IP des "master"
|
|
||||||
```yaml
|
|
||||||
apcupsd_nis_master_hostname: pve2.grote.lan
|
|
||||||
```
|
|
||||||
|
|
||||||
##### Interface auf dem der "Master" erreichbar ist.
|
|
||||||
```yaml
|
|
||||||
apcupsd_nis_master_listen_ip: 0.0.0.0
|
|
||||||
```
|
|
||||||
|
|
||||||
##### Post auf dem der "Master" erreichbar ist.
|
|
||||||
```yaml
|
|
||||||
apcupsd_nis_master_listen_port: 3551
|
|
||||||
```
|
|
||||||
|
|
||||||
##### Name der USV
|
|
||||||
```yaml
|
|
||||||
apcupsd_ups_name: APC-BX950U-GR
|
|
||||||
```
|
|
||||||
|
|
|
@ -1,17 +1,40 @@
|
||||||
---
|
---
|
||||||
apcupsd_master_onbatterydelay: 10
|
## Values: http://www.apcupsd.org/manual/manual.html
|
||||||
apcupsd_master_batterylevel_for_shutdown: 50
|
|
||||||
apcupsd_master_minutes_for_shutdown: 10
|
|
||||||
apcupsd_master_nologon_when_active: always
|
|
||||||
|
|
||||||
apcupsd_slave_onbatterydelay: 10
|
## Master
|
||||||
apcupsd_slave_batterylevel_for_shutdown: 60
|
# Wenn "true" ist dieser Host master.
|
||||||
apcupsd_slave_minutes_for_shutdown: 11
|
apcupsd_nis_master: true
|
||||||
apcupsd_slave_nologon_when_active: always
|
|
||||||
|
# Interface auf dem der "Master" erreichbar ist.
|
||||||
|
apcupsd_nis_master_listen_ip: 0.0.0.0
|
||||||
|
|
||||||
|
# Post auf dem der "Master" erreichbar ist.
|
||||||
|
apcupsd_nis_master_listen_port: 3551
|
||||||
|
|
||||||
|
# Name der USV
|
||||||
|
apcupsd_ups_name: APC-BX950U-GR
|
||||||
|
|
||||||
|
## Slave
|
||||||
|
# Zeitspanne zwischen dem pollen
|
||||||
apcupsd_slave_polltime: 10 #in Sekunden
|
apcupsd_slave_polltime: 10 #in Sekunden
|
||||||
|
|
||||||
apcupsd_nis_master: on
|
|
||||||
|
## Master & Slave
|
||||||
|
# FQDN oder IP des "master"
|
||||||
apcupsd_nis_master_hostname: pve2.grote.lan
|
apcupsd_nis_master_hostname: pve2.grote.lan
|
||||||
apcupsd_nis_master_listen_ip: 0.0.0.0
|
|
||||||
apcupsd_nis_master_listen_port: 3551
|
# Zeitspanne in Sekunden, ab der der Systemdienst einen Stromausfall annimmt. Nuetzlich, um sehr kurze Ausfaelle ignorieren zu koennen.
|
||||||
apcupsd_ups_name: APC-BX950U-GR
|
apcupsd_master_onbatterydelay: 10
|
||||||
|
apcupsd_slave_onbatterydelay: 10
|
||||||
|
|
||||||
|
# Durch die USV gemeldete Restkapazitaet in Prozent, ab der der Rechner heruntergefahren wird.
|
||||||
|
apcupsd_master_batterylevel_for_shutdown: 50
|
||||||
|
apcupsd_slave_batterylevel_for_shutdown: 60
|
||||||
|
|
||||||
|
# apcupsd will shutdown the system during a power failure when the remaining runtime on batteries as internally calculated by the UPS falls below the specified minutes. Jeweils Master und Slave.
|
||||||
|
apcupsd_master_minutes_for_shutdown: 10
|
||||||
|
apcupsd_slave_minutes_for_shutdown: 11
|
||||||
|
|
||||||
|
# Specifies when apcupsd should create the NOLOGON file to prevent users from logging on to the system. Jeweils Master und Slave.
|
||||||
|
apcupsd_master_nologon_when_active: always
|
||||||
|
apcupsd_slave_nologon_when_active: always
|
||||||
|
|
Loading…
Reference in a new issue