author | Luke Hoersten <luke@hoersten.org> |
Mon, 29 Jan 2018 22:45:54 -0600 | |
changeset 7 | 55b8db128364 |
parent 1 | bc6a0f25a229 |
child 8 | e7007d23a144 |
permissions | -rw-r--r-- |
0 | 1 |
--- |
2 |
||
3 |
- name: install homekit apt packages |
|
4 |
become: yes |
|
5 |
apt: name="{{item}}" |
|
6 |
with_items: "{{hap_ubuntu_apt_packages}}" |
|
7 |
||
8 |
- name: download and unarchive HAP-NodeJS |
|
9 |
unarchive: src="{{hap_src}}" dest="{{hap_home}}" remote_src="yes" creates="{{hap_dest}}" |
|
10 |
||
11 |
- name: install npm packages |
|
12 |
npm: name="{{item}}" path="{{hap_dest}}" |
|
13 |
with_items: "{{hap_npm_packages}}" |
|
14 |
||
15 |
- name: clean up accessory examples |
|
16 |
file: path="{{hap_dest}}/accessories" state="absent" |
|
17 |
||
18 |
- name: create accessories dir |
|
19 |
file: path="{{hap_dest}}/accessories" state="directory" |
|
20 |
||
21 |
- name: create python dir |
|
22 |
file: path="{{hap_dest}}/python" state="directory" |
|
23 |
||
24 |
- name: install doord.py |
|
1 | 25 |
copy: src="../../../src/doord.py" dest="{{hap_dest}}/python/doord.py" |
0 | 26 |
notify: restart hap-nodejs service |
27 |
||
28 |
- name: install door accessory |
|
1 | 29 |
copy: src="../../../src/Door_accessory.js" dest="{{hap_dest}}/accessories/Door_accessory.js" |
0 | 30 |
notify: restart hap-nodejs service |
31 |
||
32 |
- name: build HAP-NodeJS |
|
7
55b8db128364
Removed unneeded npm command module.
Luke Hoersten <luke@hoersten.org>
parents:
1
diff
changeset
|
33 |
npm: path="{{hap_dest}}" |
0 | 34 |
|
35 |
- name: configure systemd service |
|
36 |
become: yes |
|
37 |
template: src="hap-nodejs.service.j2" dest="/lib/systemd/system/hap-nodejs.service" |
|
38 |
notify: restart hap-nodejs service |
|
39 |
||
40 |
- name: ensure hap-nodejs is started |
|
41 |
become: yes |
|
42 |
systemd: name="hap-nodejs.service" enabled="yes" state="started" |