ansible-nas/tasks/homebridge.yml

30 lines
837 B
YAML
Raw Normal View History

2019-08-25 22:24:29 +00:00
---
- name: Create Homebridge Directories
file:
path: "{{ item }}"
state: directory
with_items:
- "{{ homebridge_config_directory }}"
- name: Homebridge Docker Container
docker_container:
name: homebridge
image: oznu/homebridge
pull: true
volumes:
2019-11-26 00:30:52 +00:00
- "{{ homebridge_config_directory }}:/homebridge"
2019-08-25 22:24:29 +00:00
network_mode: host
env:
TZ: "{{ ansible_nas_timezone }}"
2019-11-26 00:30:52 +00:00
PGID: "{{ homebridge_group_id }}"
PUID: "{{ homebridge_user_id }}"
HOMEBRIDGE_CONFIG_UI: "1"
HOMEBRIDGE_CONFIG_UI_PORT: "{{ homebridge_port }}"
2019-08-25 22:24:29 +00:00
restart_policy: unless-stopped
memory: 1g
labels:
traefik.backend: "homebridge"
traefik.frontend.rule: "Host:homebridge.{{ ansible_nas_domain }}"
2019-11-26 00:30:52 +00:00
traefik.enable: "{{ homebridge_available_externally }}"
traefik.port: "8087"