mirror of
https://github.com/davestephens/ansible-nas
synced 2024-12-25 02:53:11 +00:00
move homebridge to role
This commit is contained in:
parent
3645e1ac29
commit
8067631cb0
4 changed files with 28 additions and 19 deletions
|
@ -62,7 +62,6 @@ wallabag_enabled: false
|
||||||
|
|
||||||
# Home Automation
|
# Home Automation
|
||||||
mosquitto_enabled: false
|
mosquitto_enabled: false
|
||||||
homebridge_enabled: false
|
|
||||||
openhab_enabled: false
|
openhab_enabled: false
|
||||||
|
|
||||||
# Books
|
# Books
|
||||||
|
@ -291,16 +290,6 @@ pytivo_podcasts_directory: "{{ podcasts_root }}"
|
||||||
pytivo_user_id: "0"
|
pytivo_user_id: "0"
|
||||||
pytivo_group_id: "0"
|
pytivo_group_id: "0"
|
||||||
|
|
||||||
###
|
|
||||||
### Homebridge
|
|
||||||
###
|
|
||||||
homebridge_available_externally: "false"
|
|
||||||
homebridge_config_directory: "{{ docker_home }}/homebridge/config"
|
|
||||||
homebridge_user_id: "0"
|
|
||||||
homebridge_group_id: "0"
|
|
||||||
homebridge_port: "8087"
|
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Tautulli
|
### Tautulli
|
||||||
###
|
###
|
||||||
|
|
9
nas.yml
9
nas.yml
|
@ -98,6 +98,11 @@
|
||||||
- homeassistant
|
- homeassistant
|
||||||
when: (homeassistant_enabled | default(False))
|
when: (homeassistant_enabled | default(False))
|
||||||
|
|
||||||
|
- role: homebridge
|
||||||
|
tags:
|
||||||
|
- homebridge
|
||||||
|
when: (homebridge_enabled | default(False))
|
||||||
|
|
||||||
- role: lidarr
|
- role: lidarr
|
||||||
tags:
|
tags:
|
||||||
- lidarr
|
- lidarr
|
||||||
|
@ -271,10 +276,6 @@
|
||||||
when: (mosquitto_enabled | default(False))
|
when: (mosquitto_enabled | default(False))
|
||||||
tags: mosquitto
|
tags: mosquitto
|
||||||
|
|
||||||
- import_tasks: tasks/homebridge.yml
|
|
||||||
when: (homebridge_enabled | default(False))
|
|
||||||
tags: homebridge
|
|
||||||
|
|
||||||
- import_tasks: tasks/calibre.yml
|
- import_tasks: tasks/calibre.yml
|
||||||
when: (calibre_enabled | default(False))
|
when: (calibre_enabled | default(False))
|
||||||
tags: calibre
|
tags: calibre
|
||||||
|
|
18
roles/homebridge/defaults/main.yml
Normal file
18
roles/homebridge/defaults/main.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
# enable or disable the application
|
||||||
|
homebridge_enabled: false
|
||||||
|
homebridge_available_externally: "false"
|
||||||
|
|
||||||
|
# directories
|
||||||
|
homebridge_config_directory: "{{ docker_home }}/homebridge/config"
|
||||||
|
|
||||||
|
# uid / gid
|
||||||
|
homebridge_user_id: "0"
|
||||||
|
homebridge_group_id: "0"
|
||||||
|
|
||||||
|
# network
|
||||||
|
homebridge_hostname: "homebridge"
|
||||||
|
homebridge_port: "8087"
|
||||||
|
|
||||||
|
# specs
|
||||||
|
homebridge_memory: "1g"
|
|
@ -3,17 +3,18 @@
|
||||||
file:
|
file:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
state: directory
|
state: directory
|
||||||
|
# mode: 0755
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ homebridge_config_directory }}"
|
- "{{ homebridge_config_directory }}"
|
||||||
|
|
||||||
- name: Homebridge Docker Container
|
- name: Create Homebridge Docker Container
|
||||||
docker_container:
|
docker_container:
|
||||||
name: homebridge
|
name: homebridge
|
||||||
image: oznu/homebridge
|
image: oznu/homebridge
|
||||||
pull: true
|
pull: true
|
||||||
volumes:
|
volumes:
|
||||||
- "{{ homebridge_config_directory }}:/homebridge"
|
- "{{ homebridge_config_directory }}:/homebridge"
|
||||||
network_mode: host
|
network_mode: "host"
|
||||||
env:
|
env:
|
||||||
TZ: "{{ ansible_nas_timezone }}"
|
TZ: "{{ ansible_nas_timezone }}"
|
||||||
PGID: "{{ homebridge_group_id }}"
|
PGID: "{{ homebridge_group_id }}"
|
||||||
|
@ -21,10 +22,10 @@
|
||||||
HOMEBRIDGE_CONFIG_UI: "1"
|
HOMEBRIDGE_CONFIG_UI: "1"
|
||||||
HOMEBRIDGE_CONFIG_UI_PORT: "{{ homebridge_port }}"
|
HOMEBRIDGE_CONFIG_UI_PORT: "{{ homebridge_port }}"
|
||||||
restart_policy: unless-stopped
|
restart_policy: unless-stopped
|
||||||
memory: 1g
|
memory: "{{ homebridge_memory }}"
|
||||||
labels:
|
labels:
|
||||||
traefik.enable: "{{ homebridge_available_externally }}"
|
traefik.enable: "{{ homebridge_available_externally }}"
|
||||||
traefik.http.routers.homebridge.rule: "Host(`homebridge.{{ ansible_nas_domain }}`)"
|
traefik.http.routers.homebridge.rule: "Host(`{{ homebridge_hostname }}.{{ ansible_nas_domain }}`)"
|
||||||
traefik.http.routers.homebridge.tls.certresolver: "letsencrypt"
|
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].main: "{{ ansible_nas_domain }}"
|
||||||
traefik.http.routers.homebridge.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
traefik.http.routers.homebridge.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
Loading…
Reference in a new issue