diff options
Diffstat (limited to 'roles/hap-nodejs')
| -rw-r--r-- | roles/hap-nodejs/defaults/main.yaml | 22 | ||||
| -rw-r--r-- | roles/hap-nodejs/handlers/main.yaml | 5 | ||||
| -rw-r--r-- | roles/hap-nodejs/tasks/main.yaml | 48 | ||||
| -rw-r--r-- | roles/hap-nodejs/templates/hap-nodejs.service.j2 | 16 |
4 files changed, 0 insertions, 91 deletions
diff --git a/roles/hap-nodejs/defaults/main.yaml b/roles/hap-nodejs/defaults/main.yaml deleted file mode 100644 index 22c2b0d..0000000 --- a/roles/hap-nodejs/defaults/main.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- - -hap_apt_packages: - - "libavahi-compat-libdnssd-dev" - - "nodejs" - - "npm" - -hap_user: "hap-nodejs" -hap_restart_sec: 10 -hap_dir: "/home/{{hap_user}}" -hap_src: "https://github.com/KhaosT/HAP-NodeJS/archive/master.zip" -hap_dest: "{{hap_dir}}/HAP-NodeJS-master" - -hap_example_accessories: - - "AirConditioner_accessory.js" - - "Fan_accessory.js" - - "GarageDoorOpener_accessory.js" - - "Light_accessory.js" - - "Lock_accessory.js" - - "MotionSensor_accessory.js" - - "Outlet_accessory.js" - - "TemperatureSensor_accessory.js" diff --git a/roles/hap-nodejs/handlers/main.yaml b/roles/hap-nodejs/handlers/main.yaml deleted file mode 100644 index 25d24bd..0000000 --- a/roles/hap-nodejs/handlers/main.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -- name: restart hap-nodejs service - systemd: name="hap-nodejs" state="restarted" daemon_reload="yes" - become: yes diff --git a/roles/hap-nodejs/tasks/main.yaml b/roles/hap-nodejs/tasks/main.yaml deleted file mode 100644 index f83a4da..0000000 --- a/roles/hap-nodejs/tasks/main.yaml +++ /dev/null @@ -1,48 +0,0 @@ ---- - -- name: create hap-nodejs user - become: yes - user: - name: "{{hap_user}}" - comment: "HAP-NodeJS" - groups: "spi,i2c,gpio" - shell: "/bin/false" - home: "{{hap_dir}}" - move_home: yes - notify: restart hap-nodejs service - -- name: install homekit apt packages - become: yes - apt: name="{{hap_apt_packages}}" - notify: restart hap-nodejs service - -- name: download and unarchive HAP-NodeJS - become: yes - become_user: "{{hap_user}}" - unarchive: - src: "{{hap_src}}" - dest: "{{hap_dir}}" - remote_src: "yes" - creates: "{{hap_dest}}" - owner: "{{hap_user}}" - group: "{{hap_user}}" - notify: restart hap-nodejs service - -- name: remove example accessories - become: yes - file: path="{{hap_dest}}/accessories/{{item}}" state="absent" - with_items: "{{hap_example_accessories}}" - -- name: build HAP-NodeJS - become: yes - become_user: "{{hap_user}}" - npm: path="{{hap_dest}}" - -- name: configure systemd service - become: yes - template: src="hap-nodejs.service.j2" dest="/lib/systemd/system/hap-nodejs.service" - notify: restart hap-nodejs service - -- name: ensure hap-nodejs is started - become: yes - systemd: name="hap-nodejs.service" enabled="yes" state="started" diff --git a/roles/hap-nodejs/templates/hap-nodejs.service.j2 b/roles/hap-nodejs/templates/hap-nodejs.service.j2 deleted file mode 100644 index f657555..0000000 --- a/roles/hap-nodejs/templates/hap-nodejs.service.j2 +++ /dev/null @@ -1,16 +0,0 @@ -# {{ansible_managed}} - -[Unit] -Description=HAP-NodeJS - -[Service] -User={{hap_user}} -Group={{hap_user}} -Restart=always -RestartSec={{hap_restart_sec}} - -WorkingDirectory={{hap_dest}} -ExecStart=/usr/bin/node {{hap_dest}}/Core.js - -[Install] -WantedBy=default.target |
