roles/hap-nodejs/tasks/main.yaml
changeset 16 23b704e271bb
parent 15 6913019b9492
child 17 69a7d69de562
equal deleted inserted replaced
15:6913019b9492 16:23b704e271bb
    16   apt: name="{{item}}"
    16   apt: name="{{item}}"
    17   with_items:
    17   with_items:
    18     - "libavahi-compat-libdnssd-dev"
    18     - "libavahi-compat-libdnssd-dev"
    19     - "nodejs-legacy"
    19     - "nodejs-legacy"
    20     - "npm"
    20     - "npm"
       
    21   notify: restart hap-nodejs service
    21 
    22 
    22 - name: download and unarchive HAP-NodeJS
    23 - name: download and unarchive HAP-NodeJS
    23   become: yes
    24   become: yes
    24   become_user: "{{hap_user}}"
    25   become_user: "{{hap_user}}"
    25   unarchive:
    26   unarchive:
    27     dest: "{{hap_dir}}"
    28     dest: "{{hap_dir}}"
    28     remote_src: "yes"
    29     remote_src: "yes"
    29     creates: "{{hap_dest}}"
    30     creates: "{{hap_dest}}"
    30     owner: "{{hap_user}}"
    31     owner: "{{hap_user}}"
    31     group: "{{hap_user}}"
    32     group: "{{hap_user}}"
       
    33   notify: restart hap-nodejs service
    32 
    34 
    33 # global?
    35 - name: install python-shell npm packages
    34 - name: install npm packages
       
    35   become: yes
    36   become: yes
    36   become_user: "{{hap_user}}"
    37   npm: name="python-shell" global="yes"
    37   npm: name="{{item}}" path="{{hap_dest}}"
    38   notify: restart hap-nodejs service
    38   with_items:
       
    39     - "python-shell"
       
    40 
    39 
    41 - name: clean up accessory examples
    40 - name: clean up accessory examples
    42   become: yes
    41   become: yes
    43   file: path="{{hap_dest}}/accessories" state="absent"
    42   file: path="{{hap_dest}}/accessories" state="absent"
    44   changed_when: false
    43   changed_when: false