mirror of
https://github.com/davestephens/ansible-nas
synced 2024-12-26 11:33:08 +00:00
32 lines
1.1 KiB
YAML
32 lines
1.1 KiB
YAML
---
|
|
- name: Create Homebridge Directories
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
# mode: 0755
|
|
with_items:
|
|
- "{{ homebridge_config_directory }}"
|
|
|
|
- name: Create Homebridge Docker Container
|
|
docker_container:
|
|
name: homebridge
|
|
image: oznu/homebridge
|
|
pull: true
|
|
volumes:
|
|
- "{{ homebridge_config_directory }}:/homebridge"
|
|
network_mode: "host"
|
|
env:
|
|
TZ: "{{ ansible_nas_timezone }}"
|
|
PGID: "{{ homebridge_group_id }}"
|
|
PUID: "{{ homebridge_user_id }}"
|
|
HOMEBRIDGE_CONFIG_UI: "1"
|
|
HOMEBRIDGE_CONFIG_UI_PORT: "{{ homebridge_port }}"
|
|
restart_policy: unless-stopped
|
|
memory: "{{ homebridge_memory }}"
|
|
labels:
|
|
traefik.enable: "{{ homebridge_available_externally }}"
|
|
traefik.http.routers.homebridge.rule: "Host(`{{ homebridge_hostname }}.{{ ansible_nas_domain }}`)"
|
|
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"
|