nodejs/tasks/main.yaml
changeset 12 80a6e9af6aa9
parent 2 2556522a2a45
child 144 267d58c0e186
equal deleted inserted replaced
11:ba484e09107d 12:80a6e9af6aa9
     1 ---
     1 ---
     2 
     2 
     3 - name: download and unarchive nodejs
     3 - name: download and unarchive nodejs
     4   become: yes
     4   become: yes
     5   unarchive:
     5   unarchive:
     6     src: "https://nodejs.org/dist/{{nodejs_tag}}/{{nodejs_dir}}.tar.xz"
     6     src: "{{nodejs_src}}"
     7     dest: "/opt/"
     7     dest: "/opt/"
     8     remote_src: yes
     8     remote_src: yes
     9     creates: "/opt/{{nodejs_dir}}"
     9     creates: "/opt/{{nodejs_dir}}"
       
    10     owner: "root"
       
    11     group: "root"
    10 
    12 
    11 # sudo update-alternatives --install "/usr/bin/node" "node" "/opt/node/bin/node" 1
    13 # sudo update-alternatives --install "/usr/bin/node" "node" "/opt/node/bin/node" 1
    12 - name: update node alterantives
    14 - name: update node alterantives
    13   become: yes
    15   become: yes
    14   alternatives:
    16   alternatives: