2023-08-13 15:54:05 +00:00
|
|
|
# Ansible Role: nodejs
|
2023-08-13 07:20:47 +00:00
|
|
|
|
2023-08-13 15:54:05 +00:00
|
|
|
Install nodejs, npm and yarn packages from the official yarn repositories. Optionally install n from npm repositories for version management.
|
2023-08-13 07:20:47 +00:00
|
|
|
|
|
|
|
Tested on:
|
|
|
|
|
2023-08-13 15:54:05 +00:00
|
|
|
* Archlinux
|
|
|
|
* Debian 11
|
2023-08-13 07:20:47 +00:00
|
|
|
* Ubuntu 22.04
|
|
|
|
|
|
|
|
## Requirements
|
|
|
|
|
|
|
|
None.
|
|
|
|
|
|
|
|
## Role Variables
|
|
|
|
|
2023-08-13 15:54:05 +00:00
|
|
|
```yaml
|
|
|
|
node_version: node_20.x
|
|
|
|
n_enabled: yes
|
|
|
|
```
|
|
|
|
|
2023-08-13 07:20:47 +00:00
|
|
|
See the role [vars](vars/main.yml)
|
|
|
|
|
|
|
|
## Example Playbook
|
|
|
|
|
|
|
|
```yaml
|
2023-08-13 15:54:05 +00:00
|
|
|
- hosts: nodejs
|
2023-08-13 07:20:47 +00:00
|
|
|
roles:
|
2023-08-13 15:54:05 +00:00
|
|
|
- role: bleetube.nodejs
|
2023-08-13 07:20:47 +00:00
|
|
|
become: true
|
|
|
|
```
|