diff options
| author | Luke Hoersten <[email protected]> | 2020-02-09 12:05:37 -0600 |
|---|---|---|
| committer | Luke Hoersten <[email protected]> | 2020-02-09 12:05:37 -0600 |
| commit | 1cb30cc0aa4fda9bf0bac0b41ace862b1db434b8 (patch) | |
| tree | e4b27462ba4b8b249bb5eaac4b4be0006ca0392c /nodejs/tasks | |
| parent | 195a4a3fcf65bf47ecb1a0ea2a9fb070c18eb20f (diff) | |
Moved roles to top level
Diffstat (limited to 'nodejs/tasks')
| -rw-r--r-- | nodejs/tasks/main.yaml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/nodejs/tasks/main.yaml b/nodejs/tasks/main.yaml new file mode 100644 index 0000000..6972e76 --- /dev/null +++ b/nodejs/tasks/main.yaml @@ -0,0 +1,21 @@ +--- + +- name: download and unarchive nodejs + become: yes + unarchive: + src: "https://nodejs.org/dist/{{nodejs_tag}}/{{nodejs_dir}}.tar.xz" + dest: "/opt/" + remote_src: yes + creates: "/opt/{{nodejs_dir}}" + +# 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" + with_items: + - "node" + - "npm" |
