* 'master' of https://github.com/Narcolapser/ansible-nas:
  Adding localtime mounting
  Wrong port.
  Added ESPHome for usage with Home Assistant.
This commit is contained in:
David Stephens 2022-06-17 22:51:14 +01:00
commit eb75419df9
6 changed files with 68 additions and 0 deletions

View file

@ -28,6 +28,7 @@ If you have a spare domain name you can configure applications to be accessible
* [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
* [Fresh RSS](https://freshrss.org/) - Self-hosted RSS feed aggregator like Leed or Kriss Feed
* [get_iplayer](https://github.com/get-iplayer/get_iplayer) - download programmes from BBC iplayer

View file

@ -0,0 +1,13 @@
# 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.
You can make esphome externally available, but the program has no security so this is strongly not advised.
The EspHome web interface can be found at http://ansible_nas_host_or_ip:6052.

View file

@ -23,6 +23,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 |
| Fresh RSS | 8089 | Bridge | HTTP |
| get_iplayer | 8182 | Bridge | HTTP |

View file

@ -108,6 +108,11 @@
- emby
when: (emby_enabled | default(False))
- role: esphome
tags:
- esphome
when: (esphome_enabled | default(False))
- role: firefly
tags:
- firefly

View 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

View file

@ -0,0 +1,31 @@
---
- 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:rw"
- "/etc/localtime:/etc/localtime:ro"
ports:
- "{{ esphome_port }}:6052"
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"