nodejs/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Fri, 09 Sep 2022 11:56:30 -0500
changeset 190 59bef6fbab49
parent 144 267d58c0e186
permissions -rw-r--r--
Minor homebridge updates.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     1
---
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     2
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     3
- name: download and unarchive nodejs
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     4
  become: yes
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     5
  unarchive:
12
80a6e9af6aa9 Updated node and homebridge roles. Homebridge 1.0.0 released and breaks copy codec.
Luke Hoersten <luke@hoersten.org>
parents: 2
diff changeset
     6
    src: "{{nodejs_src}}"
0
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     7
    dest: "/opt/"
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     8
    remote_src: yes
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     9
    creates: "/opt/{{nodejs_dir}}"
12
80a6e9af6aa9 Updated node and homebridge roles. Homebridge 1.0.0 released and breaks copy codec.
Luke Hoersten <luke@hoersten.org>
parents: 2
diff changeset
    10
    owner: "root"
80a6e9af6aa9 Updated node and homebridge roles. Homebridge 1.0.0 released and breaks copy codec.
Luke Hoersten <luke@hoersten.org>
parents: 2
diff changeset
    11
    group: "root"
0
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    12
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    13
# sudo update-alternatives --install "/usr/bin/node" "node" "/opt/node/bin/node" 1
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    14
- name: update node alterantives
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    15
  become: yes
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    16
  alternatives:
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    17
    link: "/usr/bin/{{item}}"
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    18
    name: "{{item}}"
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    19
    path: "/opt/{{nodejs_dir}}/bin/{{item}}"
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    20
    priority: "1"
144
267d58c0e186 Replaced with_items with loop.
Luke Hoersten <luke@hoersten.org>
parents: 12
diff changeset
    21
  loop:
0
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    22
    - "node"
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    23
    - "npm"