Remove esphome host and role since it has been migrated to NixOS
This commit is contained in:
parent
ed74a88734
commit
6a023f5433
|
@ -1,11 +0,0 @@
|
||||||
esphome__version: "2023.7.0"
|
|
||||||
|
|
||||||
certbot__version_spec: ""
|
|
||||||
certbot__acme_account_email_address: jannes+letsencrypt-ccchh@grzb.de
|
|
||||||
certbot__certificate_domains:
|
|
||||||
- "esphome.ccchh.net"
|
|
||||||
|
|
||||||
nginx__version_spec: ""
|
|
||||||
nginx__configurations:
|
|
||||||
- name: esphome
|
|
||||||
content: "{{ lookup('ansible.builtin.file', 'z9/configs/esphome/nginx/esphome.conf') }}"
|
|
|
@ -8,9 +8,6 @@ all:
|
||||||
mqtt:
|
mqtt:
|
||||||
ansible_host: automation.z9.ccchh.net
|
ansible_host: automation.z9.ccchh.net
|
||||||
ansible_user: chaos
|
ansible_user: chaos
|
||||||
esphome:
|
|
||||||
ansible_host: esphome.z9.ccchh.net
|
|
||||||
ansible_user: chaos
|
|
||||||
zigbee2mqtt:
|
zigbee2mqtt:
|
||||||
ansible_host: zigbee2mqtt.z9.ccchh.net
|
ansible_host: zigbee2mqtt.z9.ccchh.net
|
||||||
ansible_user: chaos
|
ansible_user: chaos
|
||||||
|
@ -30,7 +27,6 @@ all:
|
||||||
hosts:
|
hosts:
|
||||||
nginx_hosts:
|
nginx_hosts:
|
||||||
hosts:
|
hosts:
|
||||||
esphome:
|
|
||||||
zigbee2mqtt:
|
zigbee2mqtt:
|
||||||
light:
|
light:
|
||||||
uptime-kuma:
|
uptime-kuma:
|
||||||
|
@ -40,15 +36,11 @@ all:
|
||||||
hosts:
|
hosts:
|
||||||
certbot_hosts:
|
certbot_hosts:
|
||||||
hosts:
|
hosts:
|
||||||
esphome:
|
|
||||||
zigbee2mqtt:
|
zigbee2mqtt:
|
||||||
uptime-kuma:
|
uptime-kuma:
|
||||||
ssh_server_config_hosts:
|
ssh_server_config_hosts:
|
||||||
hosts:
|
hosts:
|
||||||
mailserver-endpoint:
|
mailserver-endpoint:
|
||||||
esphome_hosts:
|
|
||||||
hosts:
|
|
||||||
esphome:
|
|
||||||
zigbee2mqtt_hosts:
|
zigbee2mqtt_hosts:
|
||||||
hosts:
|
hosts:
|
||||||
zigbee2mqtt:
|
zigbee2mqtt:
|
||||||
|
|
|
@ -47,11 +47,6 @@
|
||||||
roles:
|
roles:
|
||||||
- mosquitto
|
- mosquitto
|
||||||
|
|
||||||
- name: Ensure ESPHome deployment on esphome_hosts
|
|
||||||
hosts: esphome_hosts
|
|
||||||
roles:
|
|
||||||
- esphome
|
|
||||||
|
|
||||||
- name: Ensure Zigbee2MQTT deployment on zigbee2mqtt_hosts
|
- name: Ensure Zigbee2MQTT deployment on zigbee2mqtt_hosts
|
||||||
hosts: zigbee2mqtt_hosts
|
hosts: zigbee2mqtt_hosts
|
||||||
roles:
|
roles:
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
map $http_upgrade $connection_upgrade {
|
|
||||||
default upgrade;
|
|
||||||
'' close;
|
|
||||||
}
|
|
||||||
|
|
||||||
server {
|
|
||||||
listen 443 ssl http2;
|
|
||||||
listen [::]:443 ssl http2;
|
|
||||||
|
|
||||||
server_name esphome.ccchh.net;
|
|
||||||
|
|
||||||
ssl_certificate /etc/letsencrypt/live/esphome.ccchh.net/fullchain.pem;
|
|
||||||
ssl_certificate_key /etc/letsencrypt/live/esphome.ccchh.net/privkey.pem;
|
|
||||||
# verify chain of trust of OCSP response using Root CA and Intermediate certs
|
|
||||||
ssl_trusted_certificate /etc/letsencrypt/live/esphome.ccchh.net/chain.pem;
|
|
||||||
|
|
||||||
add_header Strict-Transport-Security "max-age=63072000" always;
|
|
||||||
|
|
||||||
location / {
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_redirect http:// https://;
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection $connection_upgrade;
|
|
||||||
proxy_pass http://localhost:6052;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
[Unit]
|
|
||||||
Description=ESPHome
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStart=/home/esphome/.local/bin/esphome dashboard /home/esphome/.local/bin/config/
|
|
||||||
WorkingDirectory=/home/esphome/.local/bin
|
|
||||||
User=esphome
|
|
||||||
Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/esphome/.local/bin
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
|
@ -1,7 +0,0 @@
|
||||||
---
|
|
||||||
- name: Restart esphome
|
|
||||||
become: true
|
|
||||||
ansible.builtin.systemd:
|
|
||||||
service: esphome.service
|
|
||||||
state: restarted
|
|
||||||
daemon_reload: true
|
|
|
@ -1,8 +0,0 @@
|
||||||
---
|
|
||||||
argument_specs:
|
|
||||||
main:
|
|
||||||
options:
|
|
||||||
esphome__version:
|
|
||||||
description: ESPHome version that should be installed.
|
|
||||||
type: str
|
|
||||||
required: true
|
|
|
@ -1,9 +0,0 @@
|
||||||
---
|
|
||||||
dependencies:
|
|
||||||
- role: distribution_check
|
|
||||||
vars:
|
|
||||||
distribution_check__distribution_support_spec:
|
|
||||||
- name: Debian
|
|
||||||
major_versions:
|
|
||||||
- "11"
|
|
||||||
- "12"
|
|
|
@ -1,41 +0,0 @@
|
||||||
- name: Ensure acl is installed
|
|
||||||
become: true
|
|
||||||
ansible.builtin.apt:
|
|
||||||
name: acl
|
|
||||||
- name: Ensure pip is installed
|
|
||||||
become: true
|
|
||||||
ansible.builtin.apt:
|
|
||||||
name: python3-pip
|
|
||||||
- name: Ensure esphome user exists
|
|
||||||
become: true
|
|
||||||
ansible.builtin.user:
|
|
||||||
name: esphome
|
|
||||||
shell: /bin/bash
|
|
||||||
- name: Ensure esphome dependencies are installed
|
|
||||||
become: true
|
|
||||||
become_user: esphome
|
|
||||||
ansible.builtin.pip:
|
|
||||||
name: tornado
|
|
||||||
extra_args: --user
|
|
||||||
- name: Ensure esphome is installed
|
|
||||||
become: true
|
|
||||||
become_user: esphome
|
|
||||||
ansible.builtin.pip:
|
|
||||||
name: "esphome=={{ esphome__version }}"
|
|
||||||
extra_args: --user
|
|
||||||
notify: Restart esphome
|
|
||||||
- name: Ensure esphome systemd service file is deployed
|
|
||||||
become: true
|
|
||||||
ansible.builtin.copy:
|
|
||||||
src: esphome.service
|
|
||||||
dest: /etc/systemd/system/esphome.service
|
|
||||||
mode: "644"
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
notify: Restart esphome
|
|
||||||
- name: Ensure esphome service is enabled and started
|
|
||||||
become: true
|
|
||||||
ansible.builtin.systemd:
|
|
||||||
service: esphome.service
|
|
||||||
enabled: true
|
|
||||||
state: started
|
|
Loading…
Reference in a new issue