homebridge/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Sun, 05 Feb 2023 11:01:26 -0600
changeset 208 88a7fee5effe
parent 197 1cc658995a70
permissions -rw-r--r--
Add jellyfin role.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     1
---
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     2
196
e07868e39791 Use apt package for homebridge.
Luke Hoersten <luke@hoersten.org>
parents: 191
diff changeset
     3
- name: add homebridge apt key
0
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     4
  become: yes
196
e07868e39791 Use apt package for homebridge.
Luke Hoersten <luke@hoersten.org>
parents: 191
diff changeset
     5
  get_url:
e07868e39791 Use apt package for homebridge.
Luke Hoersten <luke@hoersten.org>
parents: 191
diff changeset
     6
    url: "https://repo.homebridge.io/KEY.gpg"
197
1cc658995a70 Added key signing for apt repos.
Luke Hoersten <luke@hoersten.org>
parents: 196
diff changeset
     7
    dest: "/etc/apt/trusted.gpg.d/homebridge.asc"
196
e07868e39791 Use apt package for homebridge.
Luke Hoersten <luke@hoersten.org>
parents: 191
diff changeset
     8
    mode: "0644"
e07868e39791 Use apt package for homebridge.
Luke Hoersten <luke@hoersten.org>
parents: 191
diff changeset
     9
e07868e39791 Use apt package for homebridge.
Luke Hoersten <luke@hoersten.org>
parents: 191
diff changeset
    10
- name: add homebridge apt repo
e07868e39791 Use apt package for homebridge.
Luke Hoersten <luke@hoersten.org>
parents: 191
diff changeset
    11
  become: yes
197
1cc658995a70 Added key signing for apt repos.
Luke Hoersten <luke@hoersten.org>
parents: 196
diff changeset
    12
  apt_repository: repo="deb [signed-by=/etc/apt/trusted.gpg.d/homebridge.asc] https://repo.homebridge.io stable main"
196
e07868e39791 Use apt package for homebridge.
Luke Hoersten <luke@hoersten.org>
parents: 191
diff changeset
    13
e07868e39791 Use apt package for homebridge.
Luke Hoersten <luke@hoersten.org>
parents: 191
diff changeset
    14
- name: apt install homebridge
e07868e39791 Use apt package for homebridge.
Luke Hoersten <luke@hoersten.org>
parents: 191
diff changeset
    15
  become: yes
e07868e39791 Use apt package for homebridge.
Luke Hoersten <luke@hoersten.org>
parents: 191
diff changeset
    16
  apt: name="homebridge"
0
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    17
  notify: restart homebridge service
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    18
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    19
- name: install homebridge apt deps
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    20
  become: yes
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    21
  apt: name="{{homebridge_apt_packages}}"
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    22
  notify: restart homebridge service
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    23
196
e07868e39791 Use apt package for homebridge.
Luke Hoersten <luke@hoersten.org>
parents: 191
diff changeset
    24
# - name: install platform accessories
e07868e39791 Use apt package for homebridge.
Luke Hoersten <luke@hoersten.org>
parents: 191
diff changeset
    25
#   become: yes
e07868e39791 Use apt package for homebridge.
Luke Hoersten <luke@hoersten.org>
parents: 191
diff changeset
    26
#   npm: name="{{item}}" global="yes"
e07868e39791 Use apt package for homebridge.
Luke Hoersten <luke@hoersten.org>
parents: 191
diff changeset
    27
#   loop: "{{homebridge_npm_packages}}"
e07868e39791 Use apt package for homebridge.
Luke Hoersten <luke@hoersten.org>
parents: 191
diff changeset
    28
#   notify: restart homebridge service
0
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    29
196
e07868e39791 Use apt package for homebridge.
Luke Hoersten <luke@hoersten.org>
parents: 191
diff changeset
    30
# - name: configure homebridge
e07868e39791 Use apt package for homebridge.
Luke Hoersten <luke@hoersten.org>
parents: 191
diff changeset
    31
#   become: yes
e07868e39791 Use apt package for homebridge.
Luke Hoersten <luke@hoersten.org>
parents: 191
diff changeset
    32
#   template:
e07868e39791 Use apt package for homebridge.
Luke Hoersten <luke@hoersten.org>
parents: 191
diff changeset
    33
#     src: "{{homebridge_config_template}}"
e07868e39791 Use apt package for homebridge.
Luke Hoersten <luke@hoersten.org>
parents: 191
diff changeset
    34
#     dest: "{{homebridge_dir}}/config.json"
e07868e39791 Use apt package for homebridge.
Luke Hoersten <luke@hoersten.org>
parents: 191
diff changeset
    35
#   notify: restart homebridge service
0
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    36
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    37
- name: ensure homebridge is started
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    38
  become: yes
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    39
  systemd: name="homebridge.service" enabled="yes" state="started"