auto02 stuff

This commit is contained in:
do
2021-01-27 20:48:36 +01:00
parent a5b651886d
commit 12160a2739
4 changed files with 112 additions and 6 deletions

108
base/hostconfig/auto02.sls Normal file
View File

@@ -0,0 +1,108 @@
systemd:
service:
homeassistant:
Unit:
Description: Homeassistant
After: base.target
Service:
ExecStart: /usr/bin/podman start -a homeassistant
ExecStop: /usr/bin/podman stop -t 2 homeassistant
Install:
WantedBy: multi-user.target
homeassistant-configurator:
Unit:
Description: Homeassistant-configurator
After: base.target
Service:
ExecStart: /usr/bin/podman start -a homeassistant-configurator
ExecStop: /usr/bin/podman stop -t 2 homeassistant-configurator
Install:
WantedBy: multi-user.target
pihole:
Unit:
Description: pihole
After: base.target
Service:
ExecStart: /usr/bin/podman start -a pihole
ExecStop: /usr/bin/podman stop -t 2 pihole
Install:
WantedBy: multi-user.target
docker-registry:
Unit:
Description: Docker Registry
After: base.target
Service:
ExecStart: /usr/bin/podman start -a docker-registry
ExecStop: /usr/bin/podman stop -t 2 docker-registry
Install:
WantedBy: multi-user.target
haproxy:
enabled: True
overwrite: True
global:
stats:
enable: True
socketpath: /var/lib/haproxy/stats
mode: 660
level: admin
# Optional extra bind parameter, for example to set the owner/group on the socket file
extra: user haproxy group haproxy
ssl-default-bind-ciphers: "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384"
ssl-default-bind-options: "no-sslv3 no-tlsv10 no-tlsv11"
user: haproxy
group: haproxy
chroot:
enable: True
path: /var/lib/haproxy
daemon: True
defaults:
stats:
- enable
- uri: '/admin?stats'
- realm: 'Haproxy\ Statistics'
- auth: 'admin1:AdMiN123'
errorfiles:
400: /etc/haproxy/errors/400.http
403: /etc/haproxy/errors/403.http
408: /etc/haproxy/errors/408.http
500: /etc/haproxy/errors/500.http
502: /etc/haproxy/errors/502.http
503: /etc/haproxy/errors/503.http
504: /etc/haproxy/errors/504.http
resolvers:
local_dns:
options:
- nameserver resolvconf 192.168.10.1:53
- resolve_retries 3
- timeout retry 1s
- hold valid 10s
listens:
stats:
bind:
- "0.0.0.0:8998"
mode: http
stats:
enable: True
uri: "/admin?stats"
refresh: "20s"
frontends:
frontend1:
name: auto
bind: "*:80"
default_backend: auto
acls:
- host_auto hdr_beg(host) -i auto.
use_backends:
- auto if host_auto
backends:
backend1:
name: auto
balance: roundrobin
servers:
server1:
name: auto02
host: 127.0.0.1
port: 8123
check: check