Cleanup old configurations we no longer use. #13

Merged
june merged 1 commit from cleanup into main 2024-11-22 23:54:36 +01:00
52 changed files with 0 additions and 1377 deletions

View file

@ -1,4 +0,0 @@
mosquitto__mosquitto_conf_content: "{{ lookup('ansible.builtin.file', 'z9/configs/automation/mosquitto/mosquitto.conf') }}"
mosquitto__configs:
- name: winkekatz
content: "{{ lookup('ansible.builtin.file', 'z9/configs/automation/mosquitto/winkekatz.conf') }}"

View file

@ -1,14 +0,0 @@
certbot__version_spec: ""
certbot__acme_account_email_address: j+letsencrypt-ccchh@jsts.xyz
certbot__certificate_domains:
- "status.ccchh.net"
certbot__new_cert_commands:
- "systemctl reload nginx.service"
docker_compose__compose_file_content: "{{ lookup('ansible.builtin.file', 'z9/configs/uptime-kuma/compose.yaml') }}"
docker_compose__configuration_files: [ ]
nginx__version_spec: ""
nginx__configurations:
- name: status.ccchh.net
content: "{{ lookup('ansible.builtin.file', 'z9/configs/uptime-kuma/nginx/status.ccchh.net.conf') }}"

View file

@ -1,15 +0,0 @@
zigbee2mqtt__version: "1.37.1"
zigbee2mqtt__network_key: "{{ lookup('community.general.passwordstore', 'noc/vm-secrets/z9/zigbee2mqtt/network_key', create=false, missing='error') }}"
zigbee2mqtt__initial_config: "{{ lookup('ansible.builtin.template', 'z9/configs/zigbee2mqtt/zigbee2mqtt/configuration.yaml.j2') }}"
certbot__version_spec: ""
certbot__acme_account_email_address: j+letsencrypt-ccchh@jsts.xyz
certbot__certificate_domains:
- "zigbee2mqtt.ccchh.net"
certbot__new_cert_commands:
- "systemctl reload nginx.service"
nginx__version_spec: ""
nginx__configurations:
- name: zigbee2mqtt
content: "{{ lookup('ansible.builtin.file', 'z9/configs/zigbee2mqtt/nginx/zigbee2mqtt.conf') }}"

View file

@ -8,43 +8,18 @@ all:
authoritative-dns:
ansible_host: authoritative-dns.z9.ccchh.net
ansible_user: chaos
uptime-kuma:
ansible_host: uptime-kuma.z9.ccchh.net
ansible_user: chaos
debian_12:
hosts:
nginx_hosts:
hosts:
light:
uptime-kuma:
public_reverse_proxy_hosts:
hosts:
cert_hosts:
hosts:
certbot_hosts:
hosts:
uptime-kuma:
zigbee2mqtt_hosts:
hosts:
mosquitto_hosts:
hosts:
ola_hosts:
hosts:
light:
foobazdmx_hosts:
hosts:
light:
hifiberry_hosts:
hosts:
bluetooth_audio_sink_hosts:
hosts:
shairport_sync_hosts:
hosts:
docker_compose_hosts:
hosts:
uptime-kuma:
infrastructure_authorized_keys_hosts:
hosts:
light:
authoritative-dns:
uptime-kuma:

View file

@ -1,7 +1,4 @@
---
- name: engelsystem_specific_pre_tasks
ansible.builtin.import_playbook: engelsystem_specific_pre_tasks.yaml
- name: Ensure SSH server config deployment on ssh_server_config_hosts
hosts: ssh_server_config_hosts
roles:
@ -17,21 +14,6 @@
roles:
- nextcloud
- name: Ensure HiFiBerry deployment on hifiberry_hosts
hosts: hifiberry_hosts
roles:
- hifiberry
- name: Ensure bluetooth audio sink deployment on bluetooth_audio_sink_hosts
hosts: bluetooth_audio_sink_hosts
roles:
- bluetooth_audio_sink
- name: Ensure shairport sync deployment on shairport_sync_hosts
hosts: shairport_sync_hosts
roles:
- shairport_sync
- name: Ensure ola deployment on ola_hosts
hosts: ola_hosts
roles:
@ -42,26 +24,11 @@
roles:
- foobazdmx
- name: Ensure Mosquitto MQTT broker deployment on mosquitto_hosts
hosts: mosquitto_hosts
roles:
- mosquitto
- name: Ensure Zigbee2MQTT deployment on zigbee2mqtt_hosts
hosts: zigbee2mqtt_hosts
roles:
- zigbee2mqtt
- name: Ensure Dokuwiki config
hosts: wiki
roles:
- dokuwiki
- name: Ensure certificate deployment on cert_hosts
hosts: cert_hosts
roles:
- cert
- name: Ensure NGINX deployment on nginx_hosts, which are also public_reverse_proxy_hosts, before certbot role runs
hosts: nginx_hosts:&public_reverse_proxy_hosts
roles:

View file

@ -1,23 +0,0 @@
---
- name: engelsystem on engelsystem.z9 specific pre tasks
hosts: engelsystem
pre_tasks:
- name: Install git
ansible.builtin.apt:
name: git
state: present
- name: Clone engelsystem repo
ansible.builtin.git:
repo: https://github.com/engelsystem/engelsystem.git
dest: "{{ ansible_user_dir }}/engelsystem"
version: main
force: true
update: false
- name: apply patch to code to add train drivers license
ansible.posix.patch:
src: patches/engelsystem/code_en.patch
dest: "{{ ansible_user_dir }}/engelsystem/includes/view/UserDriverLicenses_view.php"
- name: apply patch to german locale add train drivers license
ansible.posix.patch:
src: patches/engelsystem/lang_de.patch
dest: "{{ ansible_user_dir }}/engelsystem/resources/lang/de_DE/default.po"

View file

@ -1,42 +0,0 @@
# partly generated 2022-01-08, Mozilla Guideline v5.6, nginx 1.17.7, OpenSSL 1.1.1k, intermediate configuration
# https://ssl-config.mozilla.org/#server=nginx&version=1.17.7&config=intermediate&openssl=1.1.1k&guideline=5.6
server {
# Listen on a custom port for the proxy protocol.
listen 8443 ssl http2 proxy_protocol;
# Make use of the ngx_http_realip_module to set the $remote_addr and
# $remote_port to the client address and client port, when using proxy
# protocol.
# First set our proxy protocol proxy as trusted.
set_real_ip_from 172.31.17.140;
# Then tell the realip_module to get the addreses from the proxy protocol
# header.
real_ip_header proxy_protocol;
server_name aes.ccchh.net;
ssl_certificate /etc/letsencrypt/live/aes.ccchh.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/aes.ccchh.net/privkey.pem;
# verify chain of trust of OCSP response using Root CA and Intermediate certs
ssl_trusted_certificate /etc/letsencrypt/live/aes.ccchh.net/chain.pem;
# HSTS (ngx_http_headers_module is required) (63072000 seconds)
add_header Strict-Transport-Security "max-age=63072000" always;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Port 443;
# This is https in any case.
proxy_set_header X-Forwarded-Proto https;
# Hide the X-Forwarded header.
proxy_hide_header X-Forwarded;
# Assume we are the only Reverse Proxy (well using Proxy Protocol, but that
# is transparent).
# Also provide "_hidden" for by, since it's not relevant.
proxy_set_header Forwarded "for=$remote_addr;proto=https;host=$host;by=_hidden";
location / {
proxy_pass http://127.0.0.1:5080/;
}
}

View file

@ -1,8 +0,0 @@
22c22
< form_checkbox('wants_to_drive', __('I am willing to drive a car for the event'), $user_driver_license->wantsToDrive()),
---
> form_checkbox('wants_to_drive', __('I am willing to drive a vehicle for the event'), $user_driver_license->wantsToDrive()),
48c48
< __('Forklift'),
---
> __('Train'),

View file

@ -1,12 +0,0 @@
1390,1391c1390,1391
< msgid "Forklift"
< msgstr "Gabelstapler"
---
> msgid "Train"
> msgstr "Lok"
1643,1644c1643,1644
< msgid "I am willing to drive a car for the event"
< msgstr "Ich möchte für das Event Auto fahren"
---
> msgid "I am willing to drive a vehicle for the event"
> msgstr "Ich möchte für das Event Fahrzeuge fahren"

View file

@ -1,16 +0,0 @@
# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example
per_listener_settings false
listener 1883
allow_anonymous true
pid_file /run/mosquitto/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
log_dest file /var/log/mosquitto/mosquitto.log
include_dir /etc/mosquitto/conf.d

View file

@ -1,8 +0,0 @@
connection winkekatz
address mqtt.winkekatze24.de
bridge_protocol_version mqttv311
topic winkekatze/allcats/eye/set in 2
topic winkekatze/allcats in 2
topic +/status out 2 winkekatze/ ""
topic +/connected out 2 winkekatze/ ""

View file

@ -1,17 +0,0 @@
## Links & Rescources:
#
# https://github.com/louislam/uptime-kuma
# https://github.com/louislam/uptime-kuma/wiki/%F0%9F%94%A7-How-to-Install
# https://github.com/louislam/uptime-kuma/blob/master/docker/docker-compose.yml
# https://github.com/louislam/uptime-kuma/wiki/%F0%9F%86%99-How-to-Update
# https://github.com/louislam/uptime-kuma/wiki/Reverse-Proxy
# https://github.com/louislam/uptime-kuma/wiki/Environment-Variables
services:
uptime-kuma:
image: louislam/uptime-kuma:1
restart: unless-stopped
volumes:
- "./uptime-kuma-data:/app/data"
ports:
- 3001:3001

View file

@ -1,40 +0,0 @@
# partly generated 2022-01-08, Mozilla Guideline v5.6, nginx 1.17.7, OpenSSL 1.1.1k, intermediate configuration
# https://ssl-config.mozilla.org/#server=nginx&version=1.17.7&config=intermediate&openssl=1.1.1k&guideline=5.6
# Also see: https://github.com/louislam/uptime-kuma/wiki/Reverse-Proxy
server {
# Listen on a custom port for the proxy protocol.
listen 8443 ssl http2 proxy_protocol;
# Make use of the ngx_http_realip_module to set the $remote_addr and
# $remote_port to the client address and client port, when using proxy
# protocol.
# First set our proxy protocol proxy as trusted.
set_real_ip_from 10.31.206.1;
# Then tell the realip_module to get the addreses from the proxy protocol
# header.
real_ip_header proxy_protocol;
server_name status.ccchh.net;
ssl_certificate /etc/letsencrypt/live/status.ccchh.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/status.ccchh.net/privkey.pem;
# verify chain of trust of OCSP response using Root CA and Intermediate certs
ssl_trusted_certificate /etc/letsencrypt/live/status.ccchh.net/chain.pem;
# HSTS (ngx_http_headers_module is required) (63072000 seconds)
add_header Strict-Transport-Security "max-age=63072000" always;
# replace with the IP address of your resolver
resolver 10.31.206.1;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# This is https in any case.
proxy_set_header X-Forwarded-Proto https;
proxy_pass http://127.0.0.1:3001/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}

View file

@ -1,28 +0,0 @@
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name zigbee2mqtt.ccchh.net;
ssl_certificate /etc/letsencrypt/live/zigbee2mqtt.ccchh.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/zigbee2mqtt.ccchh.net/privkey.pem;
# verify chain of trust of OCSP response using Root CA and Intermediate certs
ssl_trusted_certificate /etc/letsencrypt/live/zigbee2mqtt.ccchh.net/chain.pem;
add_header Strict-Transport-Security "max-age=63072000" always;
location / {
proxy_pass http://localhost:8080/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /api {
proxy_pass http://localhost:8080/api;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}

View file

@ -1,3 +0,0 @@
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin audiosink --noclear %I 38400 linux

View file

@ -1,8 +0,0 @@
[Unit]
Description=Bluetooth speaker agent
[Service]
ExecStart=python3 /opt/speaker-agent/speaker-agent.py
[Install]
WantedBy=default.target

View file

@ -1,14 +0,0 @@
---
- name: Restart bluetooth service
ansible.builtin.systemd:
service: bluetooth.service
state: restarted
- name: Restart speaker-agent service
become_user: audiosink
ansible.builtin.systemd:
service: speaker-agent.service
state: restarted
scope: user
daemon_reload: true
- name: Reboot host
ansible.builtin.reboot:

View file

@ -1,8 +0,0 @@
---
argument_specs:
main:
options:
bluetooth_audio_sink__name:
description: Name the bluetooth device should have
type: str
required: true

View file

@ -1,8 +0,0 @@
---
dependencies:
- role: distribution_check
vars:
distribution_check__distribution_support_spec:
- name: Debian
major_versions:
- "11"

View file

@ -1,182 +0,0 @@
---
- name: Ensure acl is installed
become: true
ansible.builtin.apt:
name: acl
- name: Ensure machine-info file is deployed
become: true
ansible.builtin.template:
src: machine-info.j2
dest: /etc/machine-info
mode: "644"
owner: root
group: root
notify: Restart bluetooth service
- name: Ensure bluetooth config is deployed
become: true
ansible.builtin.template:
src: main.conf.j2
dest: /etc/bluetooth/main.conf
mode: "644"
owner: root
group: root
notify: Restart bluetooth service
- name: Ensure bluetooth service is enabled and started
become: true
ansible.builtin.systemd:
service: bluetooth.service
state: started
enabled: true
- name: Ensure audiosink user exists
become: true
ansible.builtin.user:
name: audiosink
groups:
- audio
- name: Ensure user services are started without needing to login
become: true
ansible.builtin.command:
cmd: loginctl enable-linger audiosink
changed_when: false
- name: Detect if on Raspberry Pi # noqa ignore-errors
ansible.builtin.include_role:
name: raspberry_pi_check
ignore_errors: true
- name: Ensure debian archive keyring is installed # noqa no-handler
become: true
when: raspberry_pi_check__cpuinfo.found
ansible.builtin.apt:
deb: https://ftp.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2021.1.1+deb11u1_all.deb
- name: Ensure debian backports repository is enabled
ansible.builtin.include_role:
name: add_apt_repository
vars:
add_apt_repository__https_repo: false
add_apt_repository__repo: "deb http://deb.debian.org/debian {{ ansible_facts.lsb.codename }}-backports main contrib non-free"
add_apt_repository__filename: "{{ ansible_facts.lsb.codename }}-backports.list"
- name: Ensure pipewire, wireplumber and libspa-0.2-bluetooth are installed
become: true
ansible.builtin.apt:
name:
- pipewire
- wireplumber
- libspa-0.2-bluetooth
default_release: "{{ ansible_facts.lsb.codename }}-backports"
- name: Ensure pipewire user service is enabled and started
become: true
become_user: audiosink
ansible.builtin.systemd:
name: pipewire.service
state: started
enabled: true
scope: user
- name: Ensure pipewire-pulse user service is enabled and started
become: true
become_user: audiosink
ansible.builtin.systemd:
name: pipewire-pulse.service
state: started
enabled: true
scope: user
- name: Ensure wireplumber user service is enabled
become: true
become_user: audiosink
ansible.builtin.systemd:
name: wireplumber.service
enabled: true
scope: user
- name: Ensure speaker-agent dependencies are installed
become: true
ansible.builtin.apt:
name:
- git
- python3-dbus
- name: Ensure speaker-agent repository is cloned
become: true
ansible.builtin.git:
repo: https://github.com/fdanis-oss/pw_wp_bluetooth_rpi_speaker.git
dest: /opt/speaker-agent
version: 9a939a23865ea020816017e06fd2290f301c35f9
- name: Ensure .config directory exists
become: true
become_user: audiosink
ansible.builtin.file:
path: /home/audiosink/.config
state: directory
mode: "700"
owner: audiosink
group: audiosink
- name: Ensure .config/systemd directory exists
become: true
become_user: audiosink
ansible.builtin.file:
path: /home/audiosink/.config/systemd
state: directory
mode: "755"
owner: audiosink
group: audiosink
- name: Ensure .config/systemd/user directory exists
become: true
become_user: audiosink
ansible.builtin.file:
path: /home/audiosink/.config/systemd/user
state: directory
mode: "755"
owner: audiosink
group: audiosink
- name: Ensure speaker-agent service file is deployed
become: true
become_user: audiosink
ansible.builtin.copy:
src: speaker-agent.service
dest: /home/audiosink/.config/systemd/user/speaker-agent.service
mode: "644"
owner: audiosink
group: audiosink
notify: Restart speaker-agent service
- name: Ensure speaker-agent service is enabled and started
become: true
become_user: audiosink
ansible.builtin.systemd:
name: speaker-agent.service
state: started
enabled: true
scope: user
# This part is janky, but I don't know how to make the bluetooth service, wireplumber and pipewire
# work with each other without being logged in.
- name: Ensure getty@tty1 override file is deployed
become: true
ansible.builtin.copy:
src: override.conf
dest: /etc/systemd/system/getty@tty1.service.d/override.conf
mode: "644"
owner: root
group: root
notify: Reboot host
- name: Ensure autologin for audiosink user is enabled
become: true
ansible.builtin.systemd:
service: getty@tty1.service
enabled: true
notify: Reboot host

Some files were not shown because too many files have changed in this diff Show more