roles/hap-nodejs/tasks/main.yaml
changeset 17 69a7d69de562
parent 16 23b704e271bb
child 18 3044f32e7f74
equal deleted inserted replaced
16:23b704e271bb 17:69a7d69de562
    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:
    17   with_items: "{{hap_apt_packages}}"
    18     - "libavahi-compat-libdnssd-dev"
       
    19     - "nodejs-legacy"
       
    20     - "npm"
       
    21   notify: restart hap-nodejs service
    18   notify: restart hap-nodejs service
    22 
    19 
    23 - name: download and unarchive HAP-NodeJS
    20 - name: download and unarchive HAP-NodeJS
    24   become: yes
    21   become: yes
    25   become_user: "{{hap_user}}"
    22   become_user: "{{hap_user}}"
    35 - name: install python-shell npm packages
    32 - name: install python-shell npm packages
    36   become: yes
    33   become: yes
    37   npm: name="python-shell" global="yes"
    34   npm: name="python-shell" global="yes"
    38   notify: restart hap-nodejs service
    35   notify: restart hap-nodejs service
    39 
    36 
    40 - name: clean up accessory examples
    37 - name: remove example accessories
    41   become: yes
    38   become: yes
    42   file: path="{{hap_dest}}/accessories" state="absent"
    39   file: path="{{hap_dest}}/accessories/{{item}}" state="absent"
    43   changed_when: false
    40   with_items: "{{hap_example_accessories}}"
    44 
       
    45 - name: create accessories dir
       
    46   become: yes
       
    47   file:
       
    48     path: "{{hap_dest}}/accessories"
       
    49     state: "directory"
       
    50     owner: "{{hap_user}}"
       
    51     group: "{{hap_user}}"
       
    52   changed_when: false
       
    53 
    41 
    54 - name: install door accessory
    42 - name: install door accessory
    55   become: yes
    43   become: yes
    56   copy:
    44   copy:
    57     src: "../../../src/Door_accessory.js"
    45     src: "../../../src/Door_accessory.js"
    58     dest: "{{hap_dest}}/accessories/Door_accessory.js"
    46     dest: "{{hap_dest}}/accessories/Door_accessory.js"
    59     owner: "{{hap_user}}"
    47     owner: "{{hap_user}}"
    60     group: "{{hap_user}}"
    48     group: "{{hap_user}}"
    61   notify: restart hap-nodejs service
    49   notify: restart hap-nodejs service
    62   changed_when: false
       
    63 
    50 
    64 - name: create python dir
    51 - name: create python dir
    65   become: yes
    52   become: yes
    66   file:
    53   file:
    67     path: "{{hap_dest}}/python"
    54     path: "{{hap_dest}}/python"