Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • infrastruktur/ansible-warpzone
  • specki/ansible-warpzone
2 results
Show changes
Commits on Source (29)
Showing
with 792 additions and 18 deletions
- include: ../functions/get_secret.yml
- include_tasks: ../functions/get_secret.yml
with_items:
- { path: "{{ basedir }}/letsencrypt_notification_email", length: -1 }
when: selfSignedCN is not defined
......
......@@ -63,9 +63,6 @@ alert:
- { name: "heimdall_app_1" }
- { name: "homeassistant_app_1" }
- { name: "homeassistant_influxdb_1" }
- { name: "homematic_app_1" }
- { name: "homematic_influxdb_1" }
- { name: "homematic_telegraf_1" }
- { name: "mqtt_app_1" }
- { name: "mqtt_influxdb_1" }
- { name: "mqtt_tgbinary_1" }
......
......@@ -19,6 +19,10 @@
payload: "CLOSED"
then:
- switch.turn_off: relay
- topic: warpzone/door/status_once
payload: "OPEN"
then:
- switch.turn_on: relay
status_led:
pin:
......
......@@ -19,6 +19,10 @@
payload: "CLOSED"
then:
- switch.turn_off: relay
- topic: warpzone/door/status_once
payload: "OPEN"
then:
- switch.turn_on: relay
status_led:
pin:
......
......@@ -3,7 +3,7 @@
{% include "/includes/ansible.inc.yaml" %}
{% include "/includes/board.esp01_1m.inc.yaml" %}
comment: Halogen Lounge
comment: frei
{% include "/includes/common.inc.yaml" %}
on_message:
......
......@@ -19,6 +19,10 @@
payload: "CLOSED"
then:
- switch.turn_off: relay
- topic: warpzone/door/status_once
payload: "OPEN"
then:
- switch.turn_on: relay
substitutions:
plug_name: {{ devicename }}
......
......@@ -3,7 +3,7 @@
{% include "/includes/ansible.inc.yaml" %}
{% include "/includes/board.esp01_1m.inc.yaml" %}
comment: 3D Drucker Prusanet
comment: WLED Vorhang
{% include "/includes/common.inc.yaml" %}
on_message:
......@@ -15,6 +15,10 @@
payload: "OFF"
then:
- switch.turn_off: relay
- topic: warpzone/door/status_once
payload: "OPEN"
then:
- switch.turn_on: relay
substitutions:
plug_name: {{ devicename }}
......
......@@ -135,7 +135,7 @@ climate:
id: pid_heater
name: "PID Heater Controller"
sensor: pot_sensor
default_target_temperature: 240
default_target_temperature: 220
heat_output: pot_heater
control_parameters:
kp: 0.09549
......
---
- include: ../functions/get_secret.yml
- include_tasks: ../functions/get_secret.yml
with_items:
- { path: "{{ basedir }}/warpai_status_update_key", length: -1 }
- { path: "{{ basedir }}/homeassistant_admin_password", length: 12 }
......
......@@ -248,3 +248,764 @@ automation ansible:
timeout: 30
message: Die warpzone ist seit {{ '{{' }} states('sensor.time') {{ '}}' }} geschlossen!
mode: restart
# Stromverbrauch auf Telegram senden
- alias: ANSIBLE_stromverbrauch_send_telegram
description: Sendet alle 10 Minuten den Stromverbrauch per Telegram
trigger:
- platform: time_pattern
minutes: /10
condition: []
action:
- if:
- condition: state
entity_id: automation.ansible_zonenstatus_send_telegram
attribute: current
state: "1"
then:
- wait_for_trigger:
- platform: state
entity_id:
- automation.ansible_zonenstatus_send_telegram
attribute: current
to: "0"
- service: telegram_bot.send_message
data:
target: -1001341516106
timeout: 30
message: >-
{{ '{{' }} states('sensor.esphome_status_power') {{ '}}' }} kW bei angenehmen {{ '{{' }} states('sensor.temp') {{ '}}' }}°C
mode: restart
# Licht im Hackcenter dimmen
- alias: ANSIBLE_dali_licht_hackcenter
description: Ruft den Helper aus um per MQTT das Licht zu dimmen
trigger:
- platform: state
entity_id:
- input_number.dali_licht_hackcenter
for:
hours: 0
minutes: 0
seconds: 0
action:
- service: mqtt.publish
data:
topic: light/dali
payload_template: "{{ '{{' }} states('input_number.dali_licht_hackcenter') | int {{ '}}' }}"
mode: restart
# turn off all radiators
- alias: ANSIBLE_heizung_aus
description: Schaltet alle Heizungen aus
trigger: []
condition: []
action:
- service: climate.turn_off
target:
entity_id:
- climate.hackcenter_mitte
- climate.lounge_vorne
- climate.treppenhaus_thermostat_1
- climate.vortragsraum_vorne
- climate.holzwerkstatt_vorne
- climate.kackcenter_klo
mode: single
# turn on all radiators
- alias: ANSIBLE_heizung_an
description: Schaltet alle Heizungen an
trigger: []
condition: []
action:
- service: climate.turn_on
target:
entity_id:
- climate.hackcenter_mitte
- climate.lounge_vorne
- climate.treppenhaus_thermostat_1
- climate.vortragsraum_vorne
- climate.holzwerkstatt_vorne
- climate.kackcenter_klo
- service: climate.set_temperature
target:
entity_id:
- climate.hackcenter_mitte
- climate.lounge_vorne
- climate.treppenhaus_termostat_1
- climate.vortragsraum_vorne
- climate.holzwerkstatt_vorne
- climate.kackcenter_klo
data:
temperature: 30
mode: single
# turn on all radiators to 18.5 degrees
- alias: ANSIBLE_heizung_18.5
description: Schaltet alle Heizungen auf 18.5 Grad
trigger: []
condition: []
action:
- service: climate.turn_on
target:
entity_id:
- climate.hackcenter_mitte
- climate.lounge_vorne
- climate.treppenhaus_thermostat_1
- climate.vortragsraum_vorne
- climate.holzwerkstatt_vorne
- climate.kackcenter_klo
- service: climate.set_temperature
target:
entity_id:
- climate.hackcenter_mitte
- climate.lounge_vorne
- climate.treppenhaus_termostat_1
- climate.vortragsraum_vorne
- climate.holzwerkstatt_vorne
- climate.kackcenter_klo
data:
temperature: 18.5
mode: single
# Feinstaubsensor steuert Luftfilter
- alias: ANSIBLE_Feinstaubsensor_Luftfilter
description: Feinstaubsensor steuer Luftfilter
trigger:
- platform: time_pattern
seconds: /10
condition: []
action:
- choose:
- conditions:
- condition: numeric_state
entity_id: sensor.feinstaub_2_5
below: 36
sequence:
- service: fan.set_percentage
data:
percentage: 33
target:
device_id: 8b6ff876340558ef11d13441afecec8d
- conditions:
- condition: numeric_state
entity_id: sensor.feinstaub_2_5
above: 35
below: 86
sequence:
- service: fan.set_percentage
data:
percentage: 66
target:
device_id: 8b6ff876340558ef11d13441afecec8d
- conditions:
- condition: numeric_state
entity_id: sensor.feinstaub_2_5
above: 85
sequence:
- service: fan.set_percentage
data:
percentage: 100
target:
device_id: 8b6ff876340558ef11d13441afecec8d
mode: restart
# Feinstaubsensor steuert Ampel
- alias: ANSIBLE_Feinstaubsensor_Ampel
description: Feinstaubsensor status auf Ampel anzeigen
trigger:
- platform: time_pattern
seconds: /10
condition: []
action:
- choose:
- conditions:
- condition: numeric_state
entity_id: sensor.feinstaub_2_5
below: 36
sequence:
- device_id: e26403f906b93f7c6b4f5339a21f9b26
domain: select
entity_id: select.ampel_preset
type: select_option
option: Green static
- conditions:
- condition: numeric_state
entity_id: sensor.feinstaub_2_5
above: 35
below: 86
sequence:
- device_id: e26403f906b93f7c6b4f5339a21f9b26
domain: select
entity_id: select.ampel_preset
type: select_option
option: Orange static
- conditions:
- condition: numeric_state
entity_id: sensor.feinstaub_2_5
above: 85
sequence:
- device_id: e26403f906b93f7c6b4f5339a21f9b26
domain: select
entity_id: select.ampel_preset
type: select_option
option: Red static
mode: restart
# WLED rot lounge
- alias: ANSIBLE_WLED_lounge_red
description: WLED rot in der lounge
trigger:
- type: turned_on
platform: device
device_id: 33915e12bd114226dcd4718e77a27779
entity_id: binary_sensor.button_5
domain: binary_sensor
condition: []
action:
- service: light.turn_on
data:
rgb_color:
- 255
- 0
- 0
effect: Solid
target:
area_id:
- kuche
- lounge
- serverrack
mode: queued
max: 30
# WLED rot im hackcenter
- alias: ANSIBLE_WLED_hackcenter_red
description: WLED rot im hackcenter
trigger:
- type: turned_on
platform: device
device_id: 33915e12bd114226dcd4718e77a27779
entity_id: binary_sensor.button_2
domain: binary_sensor
condition: []
action:
- service: light.turn_on
data:
rgb_color:
- 255
- 0
- 0
effect: Solid
target:
area_id:
- hackcenter
- eingang
mode: queued
max: 30
# WLED gruen lounge
- alias: ANSIBLE_WLED_lounge_green
description: WLED gruen in der lounge
trigger:
- type: turned_on
platform: device
device_id: 33915e12bd114226dcd4718e77a27779
entity_id: binary_sensor.button_5
domain: binary_sensor
for:
hours: 0
minutes: 0
seconds: 1
condition: []
action:
- service: light.turn_on
data:
rgb_color:
- 0
- 255
- 0
effect: Solid
target:
area_id:
- kuche
- lounge
- serverrack
mode: queued
max: 30
# WLED gruen hackcenter
- alias: ANSIBLE_WLED_hackcenter_green
description: WLED gruen im hackcenter
trigger:
- type: turned_on
platform: device
device_id: 33915e12bd114226dcd4718e77a27779
entity_id: binary_sensor.button_2
domain: binary_sensor
for:
hours: 0
minutes: 0
seconds: 1
condition: []
action:
- service: light.turn_on
data:
rgb_color:
- 0
- 255
- 0
effect: Solid
target:
area_id:
- hackcenter
- eingang
mode: queued
max: 30
# WLED blue lounge
- alias: ANSIBLE_WLED_lounge_blue
description: wLED blau in der lounge
trigger:
- type: turned_on
platform: device
device_id: 33915e12bd114226dcd4718e77a27779
entity_id: binary_sensor.button_5
domain: binary_sensor
for:
hours: 0
minutes: 0
seconds: 2
condition: []
action:
- service: light.turn_on
data:
rgb_color:
- 0
- 0
- 255
effect: Solid
target:
area_id:
- kuche
- lounge
- serverrack
mode: queued
max: 30
# WLED blue hackcenter
- alias: ANSIBLE_WLED_hackcenter_blue
description: wLED blau im hackcenter
trigger:
- type: turned_on
platform: device
device_id: 33915e12bd114226dcd4718e77a27779
entity_id: binary_sensor.button_2
domain: binary_sensor
for:
hours: 0
minutes: 0
seconds: 2
condition: []
action:
- service: light.turn_on
data:
rgb_color:
- 0
- 0
- 255
effect: Solid
target:
area_id:
- hackcenter
- eingang
mode: queued
max: 30
# WLED white lounge
- alias: ANSIBLE_WLED_lounge_white
description: WLED weiss in der lounge
trigger:
- type: turned_on
platform: device
device_id: 33915e12bd114226dcd4718e77a27779
entity_id: binary_sensor.button_5
domain: binary_sensor
for:
hours: 0
minutes: 0
seconds: 3
condition: []
action:
- service: light.turn_on
data:
rgb_color:
- 255
- 255
- 255
effect: Solid
target:
area_id:
- kuche
- lounge
- serverrack
mode: queued
max: 30
# WLED white hackcenter
- alias: ANSIBLE_WLED_hackcenter_white
description: WLED weiss im hackcenter
trigger:
- type: turned_on
platform: device
device_id: 33915e12bd114226dcd4718e77a27779
entity_id: binary_sensor.button_2
domain: binary_sensor
for:
hours: 0
minutes: 0
seconds: 3
condition: []
action:
- service: light.turn_on
data:
rgb_color:
- 255
- 255
- 255
effect: Solid
target:
area_id:
- hackcenter
- eingang
mode: queued
max: 30
# WLED off lounge
- alias: ANSIBLE_WLED_lounge_off
description: WLED aus in der lounge
trigger:
- type: turned_on
platform: device
device_id: 33915e12bd114226dcd4718e77a27779
entity_id: binary_sensor.button_6
domain: binary_sensor
for:
hours: 0
minutes: 0
seconds: 0
condition: []
action:
- service: light.turn_off
target:
area_id:
- kuche
- lounge
- serverrack
mode: queued
max: 30
# WLED off hackcenter
- alias: ANSIBLE_WLED_hackcenter_off
description: WLED aus im hackcenter
trigger:
- type: turned_on
platform: device
device_id: 33915e12bd114226dcd4718e77a27779
entity_id: binary_sensor.button_3
domain: binary_sensor
for:
hours: 0
minutes: 0
seconds: 0
condition: []
action:
- service: light.turn_off
target:
area_id:
- hackcenter
- eingang
mode: queued
max: 30
# WLED default Lounge
- alias: "ANSIBLE_WLED_lougne_default"
description: WLED Default effect in der Lounge
trigger:
- type: turned_on
platform: device
device_id: 33915e12bd114226dcd4718e77a27779
entity_id: binary_sensor.button_4
domain: binary_sensor
for:
hours: 0
minutes: 0
seconds: 0
condition: []
action:
- service: light.turn_on
data: {}
target:
area_id:
- kuche
- lounge
- serverriack
- service: select.select_option
data:
option: default
target:
entity_id:
- select.kueche_preset
- select.loungedecke_preset
- select.rack_preset
- select.theke_preset
- select.warpcubes_preset
- select.loungetisch_preset
- select.matrix01_preset
- select.vorhang_preset
- select.lampan_preset
- select.clock_preset
- select.fernseher01_preset
mode: single
# WLED default hackcenter
- alias: "ANSIBLE_WLED_hackcenter_default"
description: WLED Default effect im hackcenter
trigger:
- type: turned_on
platform: device
device_id: 33915e12bd114226dcd4718e77a27779
entity_id: binary_sensor.button_1
domain: binary_sensor
for:
hours: 0
minutes: 0
seconds: 0
condition: []
action:
- service: light.turn_on
data: {}
target:
area_id:
- hackcenter
- eingang
- service: select.select_option
data:
option: default
target:
entity_id:
- select.icicles_preset
- select.lightsaber01_preset
- select.lightsaber02_preset
- select.loetecke_preset
- select.schild_preset
- select.trocknerschlauch_preset
- service: light.turn_on
data:
rgb_color:
- 255
- 160
- 0
target:
device_id: d1d266daf7d11e675319fdae0226a197
mode: single
# WLED meteor lounge
- alias: "ANSIBLE_WLED_Lounge_Meteor"
description: WLED Meteor effect in der Lounge
trigger:
- type: turned_on
platform: device
device_id: 33915e12bd114226dcd4718e77a27779
entity_id: binary_sensor.button_4
domain: binary_sensor
for:
hours: 0
minutes: 0
seconds: 2
condition: []
action:
- service: light.turn_on
data: {}
target:
area_id:
- kuche
- lounge
- serverrack
- service: select.select_option
data:
option: Meteor
target:
entity_id:
- select.kueche_preset
- select.loetecke_preset
- select.loungedecke_preset
- select.rack_preset
- select.theke_preset
- select.warpcubes_preset
- select.loungetisch_preset
- select.matrix01_preset
- select.vorhang_preset
- select.lampan_preset
- select.clock_preset
- select.fernseher01_preset
mode: single
# WLED meteor Hackcenter
- alias: "ANSIBLE_WLED_Hackcenter_Meteor"
description: WLED Meteor effect im Hackcenter
trigger:
- type: turned_on
platform: device
device_id: 33915e12bd114226dcd4718e77a27779
entity_id: binary_sensor.button_1
domain: binary_sensor
for:
hours: 0
minutes: 0
seconds: 2
condition: []
action:
- service: light.turn_on
data: {}
target:
area_id:
- hackcenter
- eingang
- service: select.select_option
data:
option: Meteor
target:
entity_id:
- select.icicles_preset
- select.lightsaber01_preset
- select.lightsaber02_preset
- select.loetecke_preset
- select.schild_preset
- select.trocknerschlauch_preset
- service: light.turn_on
data:
rgb_color:
- 255
- 0
- 238
target:
device_id: d1d266daf7d11e675319fdae0226a197
mode: single
# WLED Zonenstatus
- alias: "ANSIBLE_WLED_Zonenstatus"
description: "Turn WLED devices on, when opened, off when closed"
mode: single
trigger:
- platform: state
entity_id:
- input_select.zonenstatus
condition: []
action:
- choose:
- conditions:
- condition: state
entity_id: input_select.zonenstatus
state: open
sequence:
- service: light.turn_on
data: {}
target:
area_id:
- eingang
- hackcenter
- kuche
- lounge
- conditions:
- condition: state
entity_id: input_select.zonenstatus
state: closed
sequence:
- service: light.turn_off
data: {}
target:
area_id:
- eingang
- hackcenter
- kuche
- lounge
# ESPHOME Zonenstatus
- alias: "ANSIBLE_ESPHOME_Zonenstatus"
description: ""
mode: single
trigger:
- platform: state
entity_id:
- input_select.zonenstatus
condition: []
action:
- choose:
- conditions:
- condition: state
entity_id: input_select.zonenstatus
state: "opened"
sequence:
- service: light.turn_on
data:
effect: Rainbow
target:
entity_id:
- light.liba_logo_leds
- light.kuehl_leds
- type: turn_on
device_id: 7ba91dde6b1413340fdc66f2984dfd00
entity_id: light.brightness
domain: light
- conditions:
- condition: state
entity_id: input_select.zonenstatus
state: "closed"
sequence:
- type: turn_off
device_id: 1dace6e3f89d85152cde6383312792eb
entity_id: switch.esphome_plug01_relay
domain: switch
- type: turn_off
device_id: 9f6aded98a4a96ab85c96b829895f449
entity_id: switch.esphome_plug02_relay
domain: switch
- type: turn_off
device_id: 502f88ff07aa71cb053ad4112e0dd6bd
entity_id: switch.esphome_plug03_relay
domain: switch
- type: turn_off
device_id: b9ea4fd30dabfe365b5098c66eb1f4ba
entity_id: switch.esphome_plug04_relay
domain: switch
- type: turn_off
device_id: c5f54add49fda7640497b1883315d48b
entity_id: switch.esphome_plug05_relay
domain: switch
- type: turn_off
device_id: a0788c8cf4ee036ce43e0d563fdbdb3a
entity_id: switch.esphome_plug06_relay
domain: switch
- type: turn_off
device_id: 1637a583963ba02dc7baa17427f8ac00
entity_id: switch.esphome_plug07_relay
domain: switch
- type: turn_off
device_id: 1da3229859c49c822fd8e9c630fa9004
entity_id: switch.esphome_plug08_relay
domain: switch
- service: light.turn_off
data: {}
target:
entity_id:
- light.liba_logo_leds
- light.kuehl_leds
- type: turn_off
device_id: 7ba91dde6b1413340fdc66f2984dfd00
entity_id: light.brightness
domain: light
\ No newline at end of file
---
- include: ../functions/get_secret.yml
- include_tasks: ../functions/get_secret.yml
with_items:
- { path: "{{ basedir }}/influxdb_password", length: 12 }
- { path: "{{ basedir }}/influxdb_token", length: 24 }
......
---
- include: ../functions/get_secret.yml
- include_tasks: ../functions/get_secret.yml
with_items:
- { path: "{{ basedir }}/homeassistant_admin_password", length: 12 }
- { path: "{{ basedir }}/influxdb_password", length: 12 }
......
---
# Get secrets
- include: ../functions/get_secret.yml
- include_tasks: ../functions/get_secret.yml
with_items:
- { path: /srv/gitea/mysql_root_pw, length: 24 }
- { path: /srv/gitea/mysql_user_pw, length: 12 }
......
---
# Get secrets
- include: ../functions/get_secret.yml
- include_tasks: ../functions/get_secret.yml
with_items:
- { path: /srv/mysql/mysql_root_pw, length: 24 }
- { path: /srv/mysql/mysql_user_pw, length: 12 }
......
---
- include: ../functions/get_secret.yml
- include_tasks: ../functions/get_secret.yml
with_items:
- { path: /srv/nextcloud/nextcloud_admin_pass, length: 24 }
- { path: /srv/nextcloud/mysql_admin_pass, length: 24 }
......
......@@ -42,6 +42,9 @@ services:
MYSQL_HOST: mysql
NEXTCLOUD_ADMIN_USER: "admin"
NEXTCLOUD_ADMIN_PASSWORD: "{{nextcloud_admin_pass}}"
OVERWRITEPROTOCOL: https
OVERWRITECLIURL: https://{{ domain }}
OVERWRITEHOST: {{ domain }}
labels:
- traefik.enable=true
- traefik.http.routers.{{ servicename }}.rule=Host(`{{ domain }}`)
......
---
- include: ../functions/get_secret.yml
- include_tasks: ../functions/get_secret.yml
with_items:
- { path: /srv/ldap/secret/ldap_readonly_pass, length: -1 }
- { path: "{{ basedir }}/icinga_admin_pass", length: 12 }
......
......@@ -3,7 +3,7 @@
###################################
# Set Version
MAILU_VERSION=2.0.15
MAILU_VERSION=2.0.16
# enable IPv6
SUBNET6=fd00:dead:beef:25::/64
......@@ -27,9 +27,6 @@ SQLALCHEMY_DATABASE_URI_ROUNDCUBE=mysql://roundcube:{{ roundcube_db_pass }}@db/r
# Common configuration variables
###################################
# Set mailu version
MAILU_VERSION=2.0
# Set to a randomly generated 16 bytes string
SECRET_KEY={{ mailu_secret_key }}
......