Add nodejs playbook for having a more recent version on development machines with apt.
This commit is contained in:
@@ -165,6 +165,8 @@
|
||||
- include_tasks: tasks/workstation/mac-os/software/brew.yml
|
||||
when: ansible_system == "Darwin"
|
||||
|
||||
- include_tasks: tasks/workstation/linux/software/nodejs.yml
|
||||
|
||||
## Configuration Tasks ##
|
||||
|
||||
- include_tasks: tasks/workstation/shared/settings/gnome.yml
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
---
|
||||
# 20260730 - Hyperling
|
||||
# Install much more recent Node versions.
|
||||
|
||||
# https://linuxcapable.com/how-to-install-node-js-on-debian-linux/
|
||||
|
||||
- name: Workstation | Software | NodeJS
|
||||
block:
|
||||
|
||||
- name: Workstation | Software | NodeJS | Facts
|
||||
set_fact:
|
||||
node_version: node_24.x
|
||||
|
||||
- name: Workstation | Software | NodeJS | Old | Remove
|
||||
package:
|
||||
name: npm
|
||||
state: absent
|
||||
|
||||
- name: Workstation | Software | NodeJS | extrepo | Install
|
||||
package:
|
||||
name: extrepo
|
||||
state: present
|
||||
update_cache: yes
|
||||
|
||||
- name: Workstation | Software | NodeJS | extrepo | Enable {{ node_version }}
|
||||
shell: "extrepo enable {{ node_version }}"
|
||||
|
||||
- name: Workstation | Software | NodeJS | Install
|
||||
package:
|
||||
name: nodejs
|
||||
state: latest
|
||||
update_cache: yes
|
||||
|
||||
when: ansible_pkg_mgr == "apt"
|
||||
and coding == true
|
||||
Reference in New Issue
Block a user