nodejs

Webarchitects Ansible Node.js role

pipeline status

This repository contains an Ansible role for installing Node.js, on Debian and Ubuntu using either binary packages or NodeSource apt packages.

See the Node.js vulnerabilities blog and the GitHub node releases for the latest versions.

Role variables

See the defaults/main.yml file for the default variables, the vars/main.yml file for the preset variables and the meta/argument_specs.yml file for the variable specification.

Variable name Default value Comment
nodejs false Set to true for all the tasks in this role to be run.
nodejs_download_path /root/nodejs Path to use for downloading binary packages, GPG signatures and SHA256SUM files.
nodejs_install nodesource Set to binary for tar archives from GitHub or nodesource for a apt install
nodejs_packages [] Additional node packages to install
nodejs_src false Set to true to enable the NodeSource source package repo
nodejs_version 20 For binary installs a version number like 16.15.1 or a symlink from the archive like latest-v16.x or latest for the very latest release, for NodeSource apt based installs an quoted integer, for example "16"

Usage

This role requires JC version 1.20.2 or later to be installed on the Ansible controller for the parsing of gpg command output, it can be installed using Ansible.

This role can also be used with the localhost repo to install node locally.

Repository

The primary URL of this repo is https://git.coop/webarch/nodejs however it is also mirrored to GitHub and available via Ansible Galaxy.

If you use this role please use a tagged release, see the release notes.

Copyright 2019-2024 Chris Croome, <[email protected]>.

This role is released under the same terms as Ansible itself, the GNU GPLv3.

About

Ansible role for installing Node.js on Debian and Ubuntu servers

Install
ansible-galaxy install webarch-coop/ansible-role-nodejs
GitHub repository
License
gpl-3.0
Downloads
17
Owner
Multi-stakeholder co-operative which provides ethical & green, web hosting, virtual servers and GNU/Linux sysadmin & devop services, code at git.coop/webarch