blob: af47585835398a5ac1eea6735b09553d1f149972 [file] [log] [blame]
---
# nodejs tasks/Debian.yml
#
# SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
# SPDX-License-Identifier: Apache-2.0
- name: Add NodeSource apt repo key
apt_key:
data: "{{ lookup('file','nodesource.gpg.key') }}"
state: "present"
- name: Add NodeSource apt repo
apt_repository:
repo: "deb https://deb.nodesource.com/{{ nodejs_version }} {{ ansible_lsb['codename'] }} main"
mode: "0600"
update_cache: true
- name: Install Node.js
apt:
name: "nodejs"
state: "present"
update_cache: true
cache_valid_time: 3600