2019-08-25 22:24:29 +00:00
|
|
|
---
|
|
|
|
- name: Create Homebridge Directories
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
2021-02-07 22:55:49 +00:00
|
|
|
# mode: 0755
|
2019-08-25 22:24:29 +00:00
|
|
|
with_items:
|
|
|
|
- "{{ homebridge_config_directory }}"
|
|
|
|
|
2021-02-07 22:55:49 +00:00
|
|
|
- name: Create Homebridge Docker Container
|
2019-08-25 22:24:29 +00:00
|
|
|
docker_container:
|
|
|
|
name: homebridge
|
|
|
|
image: oznu/homebridge
|
|
|
|
pull: true
|
|
|
|
volumes:
|
2019-11-26 00:30:52 +00:00
|
|
|
- "{{ homebridge_config_directory }}:/homebridge"
|
2021-02-07 22:55:49 +00:00
|
|
|
network_mode: "host"
|
2019-08-25 22:24:29 +00:00
|
|
|
env:
|
|
|
|
TZ: "{{ ansible_nas_timezone }}"
|
2019-11-26 00:30:52 +00:00
|
|
|
PGID: "{{ homebridge_group_id }}"
|
|
|
|
PUID: "{{ homebridge_user_id }}"
|
2019-08-29 06:07:35 +00:00
|
|
|
HOMEBRIDGE_CONFIG_UI: "1"
|
2020-01-05 21:47:40 +00:00
|
|
|
HOMEBRIDGE_CONFIG_UI_PORT: "{{ homebridge_port }}"
|
2019-08-25 22:24:29 +00:00
|
|
|
restart_policy: unless-stopped
|
2021-02-07 22:55:49 +00:00
|
|
|
memory: "{{ homebridge_memory }}"
|
2019-08-29 06:07:35 +00:00
|
|
|
labels:
|
2019-11-26 00:30:52 +00:00
|
|
|
traefik.enable: "{{ homebridge_available_externally }}"
|
2021-02-07 22:55:49 +00:00
|
|
|
traefik.http.routers.homebridge.rule: "Host(`{{ homebridge_hostname }}.{{ ansible_nas_domain }}`)"
|
2021-01-19 23:51:59 +00:00
|
|
|
traefik.http.routers.homebridge.tls.certresolver: "letsencrypt"
|
|
|
|
traefik.http.routers.homebridge.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
|
|
|
traefik.http.routers.homebridge.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
|
|
|
traefik.http.services.homebridge.loadbalancer.server.port: "8087"
|