homebridge/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Thu, 20 Jul 2023 18:07:44 -0500
changeset 214 3069b7d001f7
parent 197 1cc658995a70
permissions -rw-r--r--
Added nostr relayer role.

---

- 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"