This role installs Node.js from the NodeSource package repositories on systems running Debian/Ubuntu and RHEL/CentOS.
Root accesss is required for installing packages, so you must run it in a playbook with global root privileges or define become: yes when the role is included:
- hosts: nodejs_servers
roles:
- role: transitiv.nodesource
become: yesThis role has no dependencies.
nodesource_version: 13Defines the version of Node.js that will be installed. NodeSource currently provides versions 10, 12, 13 and 14.
nodesource_packages:
- nodejsDefines the package(s) installed by the role. This variable is "flattened" before it is used so it can contain nested lists if desired.
nodesource_packages_state: presentDefines the state of the packages defined in nodesource_packages. See the state parameter in the apt and yum Ansible modules for valid values.
This role is available under the terms of the MIT license.
This role was created by Transitiv Technologes Ltd..