Squash merge move_to_single_file_pkgs into main
This commit is contained in:
@@ -1,9 +1,40 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
#
|
||||
## Package: nodejs
|
||||
## Description: v8 javascript engine
|
||||
## Version: system
|
||||
## Methods: system
|
||||
## Helpers: -
|
||||
---
|
||||
- name: Load nodejs config
|
||||
ansible.builtin.include_tasks:
|
||||
file: config/nodejs.yml
|
||||
|
||||
- name: Append nodejs to pkg_sys
|
||||
- name: Set nodejs default facts
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + nodejs.pkgs }}"
|
||||
nodejs:
|
||||
methods:
|
||||
- system
|
||||
pkgname:
|
||||
RedHat:
|
||||
- nodejs
|
||||
FreeBSD:
|
||||
- node
|
||||
- npm
|
||||
- name: Configure nodejs
|
||||
when:
|
||||
- "'nodejs' not in __configured"
|
||||
block:
|
||||
- name: Set nodejs install method
|
||||
when:
|
||||
- nodejs_imethod is undefined
|
||||
ansible.builtin.set_fact:
|
||||
nodejs_imethod: "{{ imethod if imethod in nodejs.methods else nodejs.methods[0] }}"
|
||||
|
||||
- name: Configure nodejs system install
|
||||
when:
|
||||
- nodejs_imethod == "system"
|
||||
block:
|
||||
- name: Append nodejs to pkg_sys
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + nodejs.pkgname[os_family] }}"
|
||||
|
||||
- name: Finalize nodejs configuration
|
||||
ansible.builtin.set_fact:
|
||||
__configured: "{{ __configured | combine( { 'nodejs': nodejs_imethod } ) }}"
|
||||
|
||||
Reference in New Issue
Block a user