This repository contains an Ansible role for installing Node.js, on Debian and Ubuntu using either binary packages or NodeSource apt packages or the distro version, for example the Debian Trixie version, for Debian versions Trixie and later the distro version is installed by default as this means that Corepack can also be installed as NodeSource are stopping shipping Corepack with version 25.
See the Node.js vulnerabilities blog and the GitHub node releases for the latest versions.
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.
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.
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 2018-2026 Chris Croome, <chris@webarchitects.co.uk>.
This role is released under the same terms as Ansible itself, the GNU GPLv3.