Sha256: c903d1a3d388ad4db0aae733bd3bac2d79d31062c74f1e2de369352dfa849cc5

Contents?: true

Size: 778 Bytes

Versions: 5

Compression:

Stored size: 778 Bytes

Contents

---
- name: Ensure apt-transport-https is installed.
  apt: name=apt-transport-https state=present

- name: Add Nodesource apt key.
  apt_key:
    url: https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key
    id: "9B1BE0B4"
    state: present

- name: Add NodeSource repositories for Node.js.
  apt_repository:
    repo: "{{ item }}"
    state: present
  with_items:
    - "deb https://deb.nodesource.com/node_{{ nodejs_version }} nodistro main"
    - "deb-src https://deb.nodesource.com/node_{{ nodejs_version }} nodistro main"
  register: node_repo

- name: Update apt cache if repo was added.
  apt: update_cache=yes
  when: node_repo.changed

- name: Ensure Node.js and npm are installed.
  apt: "name=nodejs={{ nodejs_version|regex_replace('x', '') }}* state=present"

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
subspace-3.0.13 ansible/roles/nodejs/tasks/main.yml
subspace-3.0.12 ansible/roles/nodejs/tasks/main.yml
subspace-3.0.11 ansible/roles/nodejs/tasks/main.yml
subspace-3.0.10 ansible/roles/nodejs/tasks/main.yml
subspace-3.0.9 ansible/roles/nodejs/tasks/main.yml