equal
deleted
inserted
replaced
1 --- |
|
2 |
|
3 - name: create hap-nodejs user |
|
4 become: yes |
|
5 user: |
|
6 name: "{{hap_user}}" |
|
7 comment: "HAP-NodeJS" |
|
8 groups: "spi,i2c,gpio" |
|
9 shell: "/bin/false" |
|
10 home: "{{hap_dir}}" |
|
11 move_home: yes |
|
12 notify: restart hap-nodejs service |
|
13 |
|
14 - name: install homekit apt packages |
|
15 become: yes |
|
16 apt: name="{{hap_apt_packages}}" |
|
17 notify: restart hap-nodejs service |
|
18 |
|
19 - name: download and unarchive HAP-NodeJS |
|
20 become: yes |
|
21 become_user: "{{hap_user}}" |
|
22 unarchive: |
|
23 src: "{{hap_src}}" |
|
24 dest: "{{hap_dir}}" |
|
25 remote_src: "yes" |
|
26 creates: "{{hap_dest}}" |
|
27 owner: "{{hap_user}}" |
|
28 group: "{{hap_user}}" |
|
29 notify: restart hap-nodejs service |
|
30 |
|
31 - name: remove example accessories |
|
32 become: yes |
|
33 file: path="{{hap_dest}}/accessories/{{item}}" state="absent" |
|
34 with_items: "{{hap_example_accessories}}" |
|
35 |
|
36 - name: build HAP-NodeJS |
|
37 become: yes |
|
38 become_user: "{{hap_user}}" |
|
39 npm: path="{{hap_dest}}" |
|
40 |
|
41 - name: configure systemd service |
|
42 become: yes |
|
43 template: src="hap-nodejs.service.j2" dest="/lib/systemd/system/hap-nodejs.service" |
|
44 notify: restart hap-nodejs service |
|
45 |
|
46 - name: ensure hap-nodejs is started |
|
47 become: yes |
|
48 systemd: name="hap-nodejs.service" enabled="yes" state="started" |
|