https://github.com/dgibbs64/ansible-role-nodejs
An Ansible role that installs Node.js.
https://github.com/dgibbs64/ansible-role-nodejs
Last synced: 2 months ago
JSON representation
An Ansible role that installs Node.js.
- Host: GitHub
- URL: https://github.com/dgibbs64/ansible-role-nodejs
- Owner: dgibbs64
- License: mit
- Created: 2024-03-25T23:01:08.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-28T13:39:07.000Z (3 months ago)
- Last Synced: 2025-02-28T19:38:54.811Z (3 months ago)
- Homepage:
- Size: 96.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# nodejs
An [Ansible](https://www.ansible.com) role that installs [Node.js](https://nodejs.org) use the [nodesource](https://github.com/nodesource/distributions) repositories.
![]()
## About
[Node.js](https://nodejs.org) is a free, open-source, cross-platform JavaScript runtime environment that lets developers create servers, web apps, command line tools and scripts. This role installs Node.js using the [nodesource](https://github.com/nodesource/distributions) repositories to install the latest Node.js deb/rpm packages typically allowing for the installation of the newer version of Node.js than is available in the default distro repositories. This role can also remove Node.js and the nodesource repositories.
_Note: this role does not use the nvm method to install Node.JS._
## Requirements
### Supported Distros
- AlmaLinux >= 8
- AmazonLinux 2023
- CentOS >= 8
- Debian >= 10
- Fedora >= 29
- OracleLinux >= 8
- Pop!\_OS >= 20.04
- Redhat Enterprise Linux >= 8
- Rocky Linux >= 8
- Ubuntu >= 20.04### Supported Architectures
- x86_64
- aarch64
- armv7l_Note: if there are any more Debian or RedHat Based distros that are supported please let me know._
## Role Variables
By default this role will setup Node.js LTS version. You can change the version to _current_ or _distro_ by setting the `nodejs_version` variable.
- LTS: Long Term Suport version.
- Current: Latest version.
- Distro: Version provided by the distribution.```yaml
# nodejs version (lts|current|distro)
nodejs_version: lts
# nodejs state (absent|present)
nodejs_state: present
```## Dependencies
```yaml
community.general
```## Example Playbook
```yaml
---
- name: Node.js
hosts: all
roles:
- dgibbs64.nodejs
```## License
MIT
## Author Information
- [Daniel Gibbs](https://danielgibbs.co.uk)