diff --git a/ansible/roles/home_assistant/files/configuration.yml b/ansible/roles/home_assistant/files/configuration.yml deleted file mode 100644 index f044047..0000000 --- a/ansible/roles/home_assistant/files/configuration.yml +++ /dev/null @@ -1,28 +0,0 @@ -# Configure a default setup of Home Assistant (frontend, api, etc) -default_config: - -# Text to speech -tts: - - platform: google_translate - -group: !include groups.yaml -automation: !include automations.yaml -script: !include scripts.yaml -scene: !include scenes.yaml - -homeassistant: - auth_mfa_modules: - - type: totp - -influxdb: - host: 127.0.0.1 - port: 48086 - -light: - - platform: flux_led - devices: - 192.168.1.211: - name: bed - -recorder: - db_url: postgres://home-assistant:home-assistant@127.0.0.1:45432/home-assistant diff --git a/ansible/roles/home_assistant/files/docker-compose.yml b/ansible/roles/home_assistant/files/docker-compose.yml deleted file mode 100644 index 67ecce1..0000000 --- a/ansible/roles/home_assistant/files/docker-compose.yml +++ /dev/null @@ -1,58 +0,0 @@ -version: "2.3" - -services: - homeassistant: - image: homeassistant/home-assistant:stable - network_mode: host - volumes: - - "{{ app_data_dir }}/home-assistant:/config" - environment: - - TZ=Europe/London - restart: unless-stopped - depends_on: - - influxdb - - db - labels: - - traefik.enable=true - - traefik.http.routers.homeassistant.rule=Host(`homeassistant.jakehoward.tech`) - - traefik.http.routers.homeassistant.tls.certresolver=le - - traefik.http.services.home-assistant-homeassistant.loadbalancer.server.port=8123 - - traefik.http.routers.homeassistant.middlewares=compress@file - - influxdb: - image: influxdb:1.8-alpine - restart: unless-stopped - volumes: - - /mnt/tank/dbs/influx/home-assistant:/var/lib/influxdb - ports: - - 127.0.0.1:48086:8086 - networks: - default: - grafana: - aliases: - - ha-influxdb - environment: - - INFLUXDB_DB=home_assistant - - INFLUXDB_HTTP_AUTH_ENABLED= - - esphome: - image: esphome/esphome:latest - restart: unless-stopped - network_mode: host - volumes: - - "{{ app_data_dir }}/esphome:/config" - - db: - image: postgres:12-alpine - restart: unless-stopped - ports: - - 127.0.0.1:45432:5432 - volumes: - - /mnt/tank/dbs/postgres/home-assistant:/var/lib/postgresql/data - environment: - - POSTGRES_PASSWORD=home-assistant - - POSTGRES_USER=home-assistant - -networks: - grafana: - external: true diff --git a/ansible/roles/home_assistant/handlers/main.yml b/ansible/roles/home_assistant/handlers/main.yml deleted file mode 100644 index fe5a0b7..0000000 --- a/ansible/roles/home_assistant/handlers/main.yml +++ /dev/null @@ -1,4 +0,0 @@ -- name: restart homeassistant - shell: - chdir: /opt/home-assistant - cmd: "{{ docker_update_command }}" diff --git a/ansible/roles/home_assistant/tasks/main.yml b/ansible/roles/home_assistant/tasks/main.yml deleted file mode 100644 index 7f662b5..0000000 --- a/ansible/roles/home_assistant/tasks/main.yml +++ /dev/null @@ -1,53 +0,0 @@ -- name: Create home-assistant directory - file: - path: /opt/home-assistant - state: directory - owner: "{{ docker_user.name }}" - mode: "{{ docker_compose_directory_mask }}" - become: true - -- name: Create config directory - file: - path: /opt/home-assistant/config - state: directory - mode: "{{ docker_compose_directory_mask }}" - become: true - -- name: Install home-assistant compose file - template: - src: files/docker-compose.yml - dest: /opt/home-assistant/docker-compose.yml - mode: "{{ docker_compose_file_mask }}" - owner: "{{ docker_user.name }}" - validate: /usr/bin/docker-compose -f %s config - notify: restart homeassistant - become: true - -- name: Install config - template: - src: files/configuration.yml - dest: /opt/home-assistant/config/configuration.yaml - mode: "{{ docker_compose_file_mask }}" - owner: "{{ docker_user.name }}" - notify: restart homeassistant - become: true - -- name: Bump IGMP max memberships - sysctl: - name: net.ipv4.igmp_max_memberships - value: "40" - sysctl_set: yes - state: present - reload: yes - sysctl_file: /etc/sysctl.d/99-sysctl.conf - become: true - -- name: Bump IGMP max MSF - sysctl: - name: net.ipv4.igmp_max_msf - value: "20" - sysctl_set: yes - state: present - reload: yes - sysctl_file: /etc/sysctl.d/99-sysctl.conf - become: true