Sha256: 4fb59bfe4e101390b87abbf91a65f9b031199a433c096221f164bd73e4222c87

Contents?: true

Size: 1.15 KB

Versions: 5

Compression:

Stored size: 1.15 KB

Contents

# Install Node.js using packages crafted by NodeSource
---
- name: Ensure the system can use the HTTPS transport for APT
  stat:
    path: /usr/lib/apt/methods/https
  register: apt_https_transport

- name: Install HTTPS transport for APT
  apt: 
    pkg: apt-transport-https
    state: installed
  when: not apt_https_transport.stat.exists

- name: Import the NodeSource GPG key into apt
  apt_key:
    url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
    state: present

- name: Add NodeSource deb repository
  apt_repository:
    repo: 'deb https://deb.nodesource.com/node_{{ debian_repo_version }} {{ ansible_distribution_release }} main'
    state: present

- name: Add NodeSource deb-src repository
  apt_repository:
    repo: 'deb-src https://deb.nodesource.com/node_{{ debian_repo_version }} {{ ansible_distribution_release }} main'
    state: present

- name: Add NodeSource repository preferences
  template:
    src: etc/apt/preferences.d/deb_nodesource_com_node.pref.2
    dest: /etc/apt/preferences.d/deb_nodesource_com_node.pref

- name: Install Node.js
  apt:
    pkg:
      - nodejs={{ nodejs_version }}*
    state: installed
    update_cache: yes

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
taperole-1.5.1 vendor/nodesource.node/tasks/main.yml
taperole-1.5.0 vendor/nodesource.node/tasks/main.yml
taperole-1.4.3 vendor/nodesource.node/tasks/main.yml
taperole-1.4.2 vendor/nodesource.node/tasks/main.yml
taperole-1.4.1 vendor/nodesource.node/tasks/main.yml