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