https://github.com/nodesource/ansible-nodejs-role
Ansible Role for Node.js Binary Install
https://github.com/nodesource/ansible-nodejs-role
Last synced: 3 months ago
JSON representation
Ansible Role for Node.js Binary Install
- Host: GitHub
- URL: https://github.com/nodesource/ansible-nodejs-role
- Owner: nodesource
- License: mit
- Created: 2014-08-14T03:01:45.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2025-02-12T17:17:09.000Z (5 months ago)
- Last Synced: 2025-03-29T03:11:17.164Z (3 months ago)
- Language: Jinja
- Size: 30.3 KB
- Stars: 131
- Watchers: 9
- Forks: 47
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ansible-nodejs-role
This is an Ansible role that adds the NodeSource APT repository and installs Node.js.
## Supported Operating Systems
Currently, this role supports the following operating systems and releases:
- **Ubuntu 20.04 LTS** (Focal Fossa)
- **Ubuntu 22.04 LTS** (Jammy Jellyfish)
- **Ubuntu 24.04 LTS** (Noble Numbat)
- **Debian 11** (Bullseye)
- **Debian 12** (Bookworm)## Usage
### Install and Run Locally
To install and test this role locally, run:
```sh
ANSIBLE_ROLES_PATH=../ ansible-playbook playbook.yml --ask-become-pass
```### Install via Ansible Galaxy
You can install this role directly from Ansible Galaxy:
```sh
ansible-galaxy install nodesource.node
```Alternatively, use a `requirements.yml` file:
```yaml
- src: https://github.com/nodesource/ansible-nodejs-role
```Then install it using:
```sh
ansible-galaxy install -r requirements.yml
```## Configuration
Example playbook configuration:
```yaml
- hosts: servers
roles:
- nodesource.node
```## Role Variables
- `nodejs_nodesource_pin_priority`: Pin-Priority of the NodeSource repository (default: `500`).
- `nodejs_version`: Set the Node.js version (options: `18.x`, `20.x`, `22.x`, `23.x`, default: `22.x`).## Testing
This role is automatically tested using GitHub Actions. To see how the CI/CD pipeline is configured, check the `.github/workflows/ci.yml` file.
## Author
Originally developed by Mark Wolfe.
Maintained by NodeSource.## License
This code is licensed under the MIT License. See the included [LICENSE.md](./LICENSE.md) file for more details.