homebridge/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Sun, 08 Jan 2023 12:57:34 -0600
changeset 204 fd38efd8f637
parent 197 1cc658995a70
permissions -rw-r--r--
Updated versions.

---

- name: add homebridge apt key
  become: yes
  get_url:
    url: "https://repo.homebridge.io/KEY.gpg"
    dest: "/etc/apt/trusted.gpg.d/homebridge.asc"
    mode: "0644"

- name: add homebridge apt repo
  become: yes
  apt_repository: repo="deb [signed-by=/etc/apt/trusted.gpg.d/homebridge.asc] https://repo.homebridge.io stable main"

- name: apt install homebridge
  become: yes
  apt: name="homebridge"
  notify: restart homebridge service

- name: install homebridge apt deps
  become: yes
  apt: name="{{homebridge_apt_packages}}"
  notify: restart homebridge service

# - name: install platform accessories
#   become: yes
#   npm: name="{{item}}" global="yes"
#   loop: "{{homebridge_npm_packages}}"
#   notify: restart homebridge service

# - name: configure homebridge
#   become: yes
#   template:
#     src: "{{homebridge_config_template}}"
#     dest: "{{homebridge_dir}}/config.json"
#   notify: restart homebridge service

- name: ensure homebridge is started
  become: yes
  systemd: name="homebridge.service" enabled="yes" state="started"