summaryrefslogtreecommitdiff
path: root/inventory/group_vars
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2020-02-23 02:56:58 +0100
committerChristian Pointner <equinox@spreadspace.org>2020-02-23 02:56:58 +0100
commit8c8d8c44cdba78108d520f3a5f254703ebedb7c5 (patch)
tree8c0c050dcaef131dd9f90adf8523407ca72bef42 /inventory/group_vars
parentupdated wifi password for elevate festival (diff)
elevate/ups: basic configuration works now
Diffstat (limited to 'inventory/group_vars')
-rw-r--r--inventory/group_vars/ele-ups/main.yml39
-rw-r--r--inventory/group_vars/elevate-festival/main.yml23
2 files changed, 47 insertions, 15 deletions
diff --git a/inventory/group_vars/ele-ups/main.yml b/inventory/group_vars/ele-ups/main.yml
index 94470b6b..285e8ea9 100644
--- a/inventory/group_vars/ele-ups/main.yml
+++ b/inventory/group_vars/ele-ups/main.yml
@@ -1,8 +1,8 @@
---
-network_lan_zone: "{{ network_zones.lan }}"
+network_mgmt_zone: "{{ network_zones.mgmt }}"
openwrt_variant: openwrt
-openwrt_release: 19.07.0
+openwrt_release: 19.07.1
openwrt_arch: ramips
openwrt_target: mt7620
openwrt_profile: ravpower_wd03
@@ -26,8 +26,9 @@ openwrt_packages_add:
- usbutils
- kmod-usb-storage
- nut-server
- - nut-upsc
- nut-driver-usbhid-ups
+ - nut-upsc
+ - nut-upscmd
openwrt_mixin:
@@ -37,6 +38,16 @@ openwrt_mixin:
/etc/htoprc:
file: "{{ global_files_dir }}/common/htoprc"
+ /usr/bin/powercycle-ups:
+ mode: "0755"
+ content: |
+ #!/bin/sh
+
+ UPS="{{ inventory_hostname | regex_replace('^ele-ups-(.*)$', '\1') }}"
+
+ upscmd -u admin -p secret "$UPS" load.off
+ sleep 5
+ upscmd -u admin -p secret "$UPS" load.on
openwrt_uci:
@@ -78,12 +89,24 @@ openwrt_uci:
ipaddr: 127.0.0.1
netmask: 255.0.0.0
- - name: interface 'lan'
+ - name: interface 'mgmt'
options:
ifname: "eth0"
proto: static
- ipaddr: "{{ network_lan_zone.prefix | ipaddr(network_lan_zone.offsets[inventory_hostname]) | ipaddr('address') }}"
- netmask: "{{ network_lan_zone.prefix | ipaddr('netmask') }}"
- gateway: "{{ network_lan_zone.gateway }}"
- dns: "{{ network_lan_zone.dns }}"
+ ipaddr: "{{ network_mgmt_zone.prefix | ipaddr(network_mgmt_zone.offsets[inventory_hostname]) | ipaddr('address') }}"
+ netmask: "{{ network_mgmt_zone.prefix | ipaddr('netmask') }}"
accept_ra: 0
+
+ nut_server:
+ - name: "driver '{{ inventory_hostname | regex_replace('^ele-ups-(.*)$', '\\1') }}'"
+ options:
+ driver: usbhid-ups
+ port: auto
+ enable_usb_serial: 0
+
+ - name: user
+ options:
+ username: admin
+ password: secret
+ instcmd:
+ - ALL
diff --git a/inventory/group_vars/elevate-festival/main.yml b/inventory/group_vars/elevate-festival/main.yml
index c9c96759..b7d95b95 100644
--- a/inventory/group_vars/elevate-festival/main.yml
+++ b/inventory/group_vars/elevate-festival/main.yml
@@ -16,11 +16,6 @@ network_zones:
ele-calypso: 203
ele-dione: 210
ele-helene: 211
- # TODO: move this to mgmt zone
- ele-ups-forum0: 230
- ele-ups-forum1: 231
- ele-ups-uhrturm0: 232
- ##
datacop: 249
equinox-t450s: 250
ele-laptop: 251
@@ -97,6 +92,9 @@ network_zones:
ele-br-test0: 220
ele-br-test1: 221
+ ele-ups-forum0: 230
+ ele-ups-forum1: 231
+ ele-ups-uhrturm0: 232
ele-dol-mixer: 200
ele-dol-translator: 201
@@ -140,8 +138,12 @@ network_zones:
encryption: "psk2"
key: "{{ vault_wifi_keys.infoscreens }}"
+ cityaccess:
+ vlan: 250
+ prefix: 192.168.250.0/24
+
ccinet:
- vlan: 128
+ vlan: 500
prefix: 85.237.2.96/28
gateway: 85.237.2.97
dns:
@@ -153,7 +155,7 @@ network_zones:
ele-media: 5 # 85.237.2.101
ccemc:
- vlan: 129
+ vlan: 501
prefix: 85.237.28.192/28
gateway: 85.237.28.193
dns:
@@ -164,3 +166,10 @@ network_zones:
ele-helene: 4 # 85.237.28.196
ele-dione: 5 # 85.237.28.197
ele-laptop: 7 # 85.237.28.199
+
+ funkfeuer:
+ vlan: 511
+ prefix: 10.12.241.128/28
+ gateway: 10.12.241.142
+ dns:
+ - 10.12.0.10