From ec466223194187021844929921bffbd759f0d7f4 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Fri, 27 Oct 2023 10:07:31 +0200 Subject: [PATCH] don't set npm_package_name when managerepo is true nodesource started adding "provides: npm" to their nodejs packages, which makes our code uninstall the nodejs package again --- manifests/params.pp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index 78db11b4..7e9fc6bf 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -27,7 +27,10 @@ $nodejs_dev_package_ensure = 'absent' $nodejs_package_name = 'nodejs' $npm_package_ensure = 'absent' - $npm_package_name = 'npm' + $npm_package_name = $manage_package_repo ? { + true => false, + default => 'npm' + } $npm_path = '/usr/bin/npm' $repo_class = 'nodejs::repo::nodesource' $package_provider = undef @@ -39,7 +42,10 @@ $nodejs_dev_package_ensure = 'absent' $nodejs_package_name = 'nodejs' $npm_package_ensure = 'absent' - $npm_package_name = 'npm' + $npm_package_name = $manage_package_repo ? { + true => false, + default => 'npm' + } $npm_path = '/usr/bin/npm' $repo_class = 'nodejs::repo::nodesource' $package_provider = undef