diff --git a/inventories/z9/host_vars/esphome.yaml b/inventories/z9/host_vars/esphome.yaml deleted file mode 100644 index bb010c1..0000000 --- a/inventories/z9/host_vars/esphome.yaml +++ /dev/null @@ -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') }}" diff --git a/inventories/z9/hosts.yaml b/inventories/z9/hosts.yaml index af1bb49..f869f51 100644 --- a/inventories/z9/hosts.yaml +++ b/inventories/z9/hosts.yaml @@ -8,9 +8,6 @@ all: mqtt: ansible_host: automation.z9.ccchh.net ansible_user: chaos - esphome: - ansible_host: esphome.z9.ccchh.net - ansible_user: chaos zigbee2mqtt: ansible_host: zigbee2mqtt.z9.ccchh.net ansible_user: chaos @@ -30,7 +27,6 @@ all: hosts: nginx_hosts: hosts: - esphome: zigbee2mqtt: light: uptime-kuma: @@ -40,15 +36,11 @@ all: hosts: certbot_hosts: hosts: - esphome: zigbee2mqtt: uptime-kuma: ssh_server_config_hosts: hosts: mailserver-endpoint: - esphome_hosts: - hosts: - esphome: zigbee2mqtt_hosts: hosts: zigbee2mqtt: diff --git a/playbooks/deploy.yaml b/playbooks/deploy.yaml index 5d8486d..f1fb208 100644 --- a/playbooks/deploy.yaml +++ b/playbooks/deploy.yaml @@ -47,11 +47,6 @@ roles: - mosquitto -- name: Ensure ESPHome deployment on esphome_hosts - hosts: esphome_hosts - roles: - - esphome - - name: Ensure Zigbee2MQTT deployment on zigbee2mqtt_hosts hosts: zigbee2mqtt_hosts roles: diff --git a/playbooks/files/z9/configs/esphome/nginx/esphome.conf b/playbooks/files/z9/configs/esphome/nginx/esphome.conf deleted file mode 100644 index 1cdc701..0000000 --- a/playbooks/files/z9/configs/esphome/nginx/esphome.conf +++ /dev/null @@ -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; - } -} diff --git a/playbooks/roles/esphome/files/esphome.service b/playbooks/roles/esphome/files/esphome.service deleted file mode 100644 index 9ff4ea2..0000000 --- a/playbooks/roles/esphome/files/esphome.service +++ /dev/null @@ -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 diff --git a/playbooks/roles/esphome/handlers/main.yaml b/playbooks/roles/esphome/handlers/main.yaml deleted file mode 100644 index fc22920..0000000 --- a/playbooks/roles/esphome/handlers/main.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -- name: Restart esphome - become: true - ansible.builtin.systemd: - service: esphome.service - state: restarted - daemon_reload: true diff --git a/playbooks/roles/esphome/meta/argument_specs.yaml b/playbooks/roles/esphome/meta/argument_specs.yaml deleted file mode 100644 index 71963ae..0000000 --- a/playbooks/roles/esphome/meta/argument_specs.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -argument_specs: - main: - options: - esphome__version: - description: ESPHome version that should be installed. - type: str - required: true diff --git a/playbooks/roles/esphome/meta/main.yaml b/playbooks/roles/esphome/meta/main.yaml deleted file mode 100644 index 02b00ac..0000000 --- a/playbooks/roles/esphome/meta/main.yaml +++ /dev/null @@ -1,9 +0,0 @@ ---- -dependencies: - - role: distribution_check - vars: - distribution_check__distribution_support_spec: - - name: Debian - major_versions: - - "11" - - "12" diff --git a/playbooks/roles/esphome/tasks/main.yaml b/playbooks/roles/esphome/tasks/main.yaml deleted file mode 100644 index f3e90f7..0000000 --- a/playbooks/roles/esphome/tasks/main.yaml +++ /dev/null @@ -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