mirror of
https://github.com/davestephens/ansible-nas
synced 2025-01-26 02:05:05 +00:00
Added ESPHome for usage with Home Assistant.
This commit is contained in:
parent
3352773f9e
commit
060f8cf522
6 changed files with 65 additions and 0 deletions
|
@ -47,6 +47,7 @@ Ansible config and a bunch of Docker containers.
|
|||
* [Duplicacy](https://duplicacy.com/) - A web UI for the Duplicacy cloud backup program, which provides lock-free deduplication backups to multiple providers
|
||||
* [Duplicati](https://www.duplicati.com/) - for backing up your stuff
|
||||
* [Emby](https://emby.media/) - Media streaming and management
|
||||
* [ESPHome](https://esphome.io/) - ESP8266/ESP32 programming and management for home automation
|
||||
* [Firefly III](https://firefly-iii.org/) - Free and open source personal finance manager
|
||||
* [get_iplayer](https://github.com/get-iplayer/get_iplayer) - download programmes from BBC iplayer
|
||||
* [Gitea](https://gitea.io/en-us/) - Simple self-hosted GitHub clone
|
||||
|
|
11
docs/applications/esphome.md
Normal file
11
docs/applications/esphome.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
# EspHome
|
||||
|
||||
Homepage: [esphome.io](https://esphome.io/)
|
||||
|
||||
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
|
||||
|
||||
## Usage
|
||||
|
||||
Set `esphome_enabled: true` in your `inventories/<your_inventory>/nas.yml` file.
|
||||
|
||||
The EspHome web interface can be found at http://ansible_nas_host_or_ip:6052.
|
|
@ -18,6 +18,7 @@ By default, applications can be found on the ports listed below.
|
|||
| Emby | 8096 | Bridge | HTTP |
|
||||
| Emby | 8096 | Bridge | HTTP |
|
||||
| Emby | 8920 | Bridge | HTTPS |
|
||||
| EspHome | 6052 | Bridge | HTTP |
|
||||
| Firefly III | 8066 | Bridge | HTTP |
|
||||
| get_iplayer | 8182 | Bridge | HTTP |
|
||||
| Gitea | 3001 | Bridge | HTTP |
|
||||
|
|
5
nas.yml
5
nas.yml
|
@ -98,6 +98,11 @@
|
|||
- emby
|
||||
when: (emby_enabled | default(False))
|
||||
|
||||
- role: esphome
|
||||
tags:
|
||||
- esphome
|
||||
when: (esphome_enabled | default(False))
|
||||
|
||||
- role: firefly
|
||||
tags:
|
||||
- firefly
|
||||
|
|
17
roles/esphome/defaults/main.yml
Normal file
17
roles/esphome/defaults/main.yml
Normal file
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
esphome_enabled: false
|
||||
esphome_available_externally: "false"
|
||||
|
||||
# directories
|
||||
esphome_data_directory: "{{ docker_home }}/esphome"
|
||||
|
||||
# uid / gid
|
||||
esphome_user_id: "1000"
|
||||
esphome_group_id: "1000"
|
||||
|
||||
# network
|
||||
esphome_hostname: "esphome"
|
||||
esphome_port: "6052"
|
||||
|
||||
# specs
|
||||
esphome_memory: 1g
|
30
roles/esphome/tasks/main.yml
Normal file
30
roles/esphome/tasks/main.yml
Normal file
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
- name: Create EspHome Directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ esphome_data_directory }}/data"
|
||||
|
||||
- name: EspHome Docker Container
|
||||
docker_container:
|
||||
name: esphome
|
||||
image: esphome/esphome:latest
|
||||
pull: true
|
||||
volumes:
|
||||
- "{{ esphome_data_directory }}:/config/esphome/data:rw"
|
||||
ports:
|
||||
- "{{ esphome_port }}:80"
|
||||
env:
|
||||
TZ: "{{ ansible_nas_timezone }}"
|
||||
PUID: "{{ esphome_user_id }}"
|
||||
PGID: "{{ esphome_group_id }}"
|
||||
restart_policy: unless-stopped
|
||||
memory: "{{ esphome_memory }}"
|
||||
labels:
|
||||
traefik.enable: "{{ esphome_available_externally }}"
|
||||
traefik.http.routers.esphome.rule: "Host(`{{ esphome_hostname }}.{{ ansible_nas_domain }}`)"
|
||||
traefik.http.routers.esphome.tls.certresolver: "letsencrypt"
|
||||
traefik.http.routers.esphome.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
||||
traefik.http.routers.esphome.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
||||
traefik.http.services.esphome.loadbalancer.server.port: "80"
|
Loading…
Reference in a new issue