nodejs/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Fri, 20 Nov 2020 13:50:42 -0600
changeset 145 7d94a7cab2f6
parent 144 267d58c0e186
permissions -rw-r--r--
Updated minecraft.

---

- name: download and unarchive nodejs
  become: yes
  unarchive:
    src: "{{nodejs_src}}"
    dest: "/opt/"
    remote_src: yes
    creates: "/opt/{{nodejs_dir}}"
    owner: "root"
    group: "root"

# sudo update-alternatives --install "/usr/bin/node" "node" "/opt/node/bin/node" 1
- name: update node alterantives
  become: yes
  alternatives:
    link: "/usr/bin/{{item}}"
    name: "{{item}}"
    path: "/opt/{{nodejs_dir}}/bin/{{item}}"
    priority: "1"
  loop:
    - "node"
    - "npm"