Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only ensure real npm packages #486

Merged
merged 1 commit into from
Oct 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,17 @@

# npm
if $nodejs::npm_package_name and $nodejs::npm_package_name != false {
# the nodesource nodejs packages provide "npm" which makes Puppet
# try to uninstall them again
if $nodejs::npm_package_ensure == absent and $nodejs::manage_package_repo == true and $nodejs::repo_class == 'nodejs::repo::nodesource' {
$allow_virtual = false
} else {
$allow_virtual = undef
}
package { $nodejs::npm_package_name:
ensure => $nodejs::npm_package_ensure,
tag => 'nodesource_repo',
ensure => $nodejs::npm_package_ensure,
allow_virtual => $allow_virtual,
tag => 'nodesource_repo',
}
}

Expand Down
2 changes: 1 addition & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
$nodejs_dev_package_name = 'nodejs-devel'
$nodejs_dev_package_ensure = 'absent'
$nodejs_package_name = 'nodejs'
$npm_package_ensure = 'present'
$npm_package_ensure = 'absent'
$npm_package_name = 'npm'
$npm_path = '/usr/bin/npm'
$repo_class = 'nodejs::repo::nodesource'
Expand Down
Loading