---

- name: add node user
  become: yes
  user: name="{{node_install_user}}"

- name: unarchive node
  become: yes
  unarchive:
    remote_src: yes
    src: "{{node_install_url}}"
    dest: "/tmp"
    creates: "/tmp/{{node_install_tar_name}}/"

- name: install node
  become: yes
  copy:
    src: "/tmp/{{node_install_tar_name}}/"
    dest: "/usr/local/bin/"
    remote_src: yes
    owner: "root"
    group: "root"
    mode: "0755"
