Compare commits
No commits in common. "72cf4f794a44ff7fdbabb238461ee74be080c776" and "7548a5fd800a15bfd63308a7f28ff7eef3226b4c" have entirely different histories.
72cf4f794a
...
7548a5fd80
|
@ -282,13 +282,13 @@ homeassistant:
|
|||
nut_server:
|
||||
ansible_host: usbip
|
||||
ups:
|
||||
liebert-psi:
|
||||
liebert-ps1:
|
||||
driver: usbhid-ups
|
||||
vendorid: "10af"
|
||||
productid: "0001"
|
||||
|
||||
nut_client:
|
||||
ups: liebert-psi
|
||||
ups: liebert-ps1
|
||||
sched:
|
||||
# How many seconds we are allowed to run on battery
|
||||
on_bat: 300 # 5 minutes
|
||||
on_bat: 300
|
17
hosts
17
hosts
|
@ -19,10 +19,10 @@ all:
|
|||
router-0:
|
||||
ansible_host: 192.168.10.10
|
||||
nut_client:
|
||||
ups: liebert-psi
|
||||
ups: liebert-ps1
|
||||
sched:
|
||||
# We want to shutdown this server last
|
||||
on_bat: 10800
|
||||
on_bat: 3600
|
||||
server-0:
|
||||
ansible_host: 192.168.10.11
|
||||
vfio_pci_ids:
|
||||
|
@ -34,15 +34,22 @@ all:
|
|||
- '10de:13c2' # NVIDIA Corporation GM204 [GeForce GTX 970]
|
||||
- '10de:13f1' # VGA compatible controller [0300]: NVIDIA Corporation GM204GL [Quadro M4000]
|
||||
nut_client:
|
||||
ups: liebert-psi
|
||||
ups: liebert-ps1
|
||||
sched:
|
||||
# We want to shutdown this server quick
|
||||
on_bat: 15
|
||||
on_bat: 10
|
||||
bastion:
|
||||
hosts:
|
||||
bastion:
|
||||
ansible_host: 192.168.20.10
|
||||
users_enable_sudo: false
|
||||
plex:
|
||||
hosts:
|
||||
# plex:
|
||||
# ansible_host: 192.168.20.31
|
||||
# nfs_libraries:
|
||||
# - 192.168.20.30:/mnt/pool0/media/Movies
|
||||
# - 192.168.20.30:/mnt/pool0/media/Series
|
||||
minecraft-server:
|
||||
# hosts:
|
||||
# minecraft-server:
|
||||
|
@ -97,8 +104,6 @@ all:
|
|||
hosts:
|
||||
ubiquiti:
|
||||
ansible_host: 192.168.10.2
|
||||
satisfactory:
|
||||
ansible_host: 192.168.20.31
|
||||
children:
|
||||
proxmox:
|
||||
bastion:
|
||||
|
|
|
@ -62,9 +62,3 @@
|
|||
- hosts: cups
|
||||
roles:
|
||||
- cups
|
||||
|
||||
# we want node metrics on the satisfactory server
|
||||
- hosts: satisfactory
|
||||
roles:
|
||||
- docker
|
||||
- prometheus.prometheus.node_exporter
|
|
@ -1,2 +0,0 @@
|
|||
collections:
|
||||
- name: prometheus.prometheus
|
|
@ -35,9 +35,6 @@
|
|||
include_tasks: user.yml
|
||||
with_dict: '{{ users }}'
|
||||
|
||||
- name: Configure monitoring
|
||||
include_tasks: monitoring.yml
|
||||
|
||||
- name: Configure hostname
|
||||
hostname:
|
||||
name: '{{ inventory_hostname }}'
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
- name: Import prometheus node_exporter role
|
||||
import_role:
|
||||
name: prometheus.prometheus.node_exporter
|
||||
when: ansible_virtualization_role == 'host'
|
|
@ -1,5 +1,5 @@
|
|||
# TODO: setup credentials
|
||||
MONITOR {{ nut_client.ups }}@{{ hostvars[nut_server.ansible_host]['ansible_default_ipv4']['address'] }} 1 monuser admin slave
|
||||
MONITOR {{ nut_client.ups }}@{{ hostvars[nut_server.ansible_host]['ansible_default_ipv4']['address'] }} 1 monuser admin secondary
|
||||
|
||||
|
||||
MINSUPPLIES 1
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
#MAXAGE 15
|
||||
LISTEN 0.0.0.0 3493
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# TODO: setup credentials
|
||||
[monuser]
|
||||
password = admin
|
||||
upsmon slave
|
||||
upsmon secondary
|
||||
|
|
|
@ -15,7 +15,3 @@
|
|||
name: nut-monitor
|
||||
enabled: true
|
||||
state: restarted
|
||||
|
||||
- name: Reload udev
|
||||
ansible.builtin.command:
|
||||
cmd: "udevadm control --reload"
|
|
@ -50,10 +50,3 @@
|
|||
- Restart nut-server
|
||||
- Restart nut-client
|
||||
- Restart nut-monitor
|
||||
|
||||
- name: Configure NUT udev rules
|
||||
template:
|
||||
src: 62-nut-usbups.rules
|
||||
dest: /etc/udev/rules.d/62-nut-usbups.rules
|
||||
notify:
|
||||
- Reload udev
|
|
@ -1,7 +0,0 @@
|
|||
SUBSYSTEM!="usb", GOTO="nut-usbups_rules_end"
|
||||
|
||||
{% for name, config in nut_server.ups.items() %}
|
||||
ACTION=="add|change", SUBSYSTEM=="usb|usb_device", SUBSYSTEMS=="usb|usb_device", ATTR{idVendor}=="{{ config.vendorid }}", ATTR{idProduct}=="{{ config.productid }}", MODE="664", GROUP="nut", RUN+="/sbin/upsdrvctl stop; /sbin/upsdrvctl start"
|
||||
{% endfor %}
|
||||
|
||||
LABEL="nut-usbups_rules_end"
|
|
@ -1,5 +1,4 @@
|
|||
maxretry = 3
|
||||
pollinterval = 2
|
||||
|
||||
{% for name, config in nut_server.ups.items() %}
|
||||
[{{ name }}]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# TODO: setup credentials
|
||||
{% for name in nut_server.ups.keys() %}
|
||||
MONITOR {{ name }}@localhost 1 monuser admin master
|
||||
MONITOR {{ name }}@localhost 1 monuser admin primary
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in New Issue