homebridge/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Mon, 29 Jul 2024 12:41:57 -0500
changeset 237 c6c11084c802
parent 197 1cc658995a70
permissions -rw-r--r--
Cleaned up always-changed status tasks.

---

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