Skip to content

Commit

Permalink
stronger allow_virtual guard
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni committed Oct 28, 2023
1 parent c2d5e79 commit f627f19
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,16 @@

# 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,
allow_virtual => false,
allow_virtual => $allow_virtual,
tag => 'nodesource_repo',
}
}
Expand Down

0 comments on commit f627f19

Please sign in to comment.