finished with a bunch more
This commit is contained in:
@@ -1,9 +1,27 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Load nodejs config
|
||||
ansible.builtin.include_tasks:
|
||||
file: config/nodejs.yml
|
||||
- name: Configure nodejs
|
||||
when:
|
||||
- "'nodejs' not in __configured"
|
||||
block:
|
||||
- name: Set nodejs install method
|
||||
when:
|
||||
- nodejs_install_method is undefined
|
||||
ansible.builtin.set_fact:
|
||||
nodejs_install_method: "{{ install_method if install_method in nodejs.install_methods else nodejs.install_methods[0] }}"
|
||||
|
||||
- name: Append nodejs to pkg_sys
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + nodejs.pkgs }}"
|
||||
- name: Configure nodejs system install
|
||||
when:
|
||||
- nodejs_install_method == "system"
|
||||
block:
|
||||
- name: Set nodejs package name
|
||||
ansible.builtin.set_fact:
|
||||
nodejs_pkgname: "{{ nodejs.pkgname[system] }}"
|
||||
nodejs_deps: "{{ nodejs.pkg_deps[system] | default([]) }}"
|
||||
- name: Append nodejs to pkg_sys
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + [nodejs_pkgname] + nodejs_deps }}"
|
||||
|
||||
- name: Finalize nodejs configuration
|
||||
ansible.builtin.set_fact:
|
||||
__configured: "{{ __configured | combine( { 'nodejs': nodejs_install_method } ) }}"
|
||||
|
||||
Reference in New Issue
Block a user