Skip to content

Commit

Permalink
change default package ensure value to installed
Browse files Browse the repository at this point in the history
For compatibility with puppetlabs/puppetlabs-stdlib#1196.
  • Loading branch information
kenyon committed Sep 17, 2023
1 parent bf4028a commit c0ba860
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 97 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,24 +74,24 @@ Install Node.js and npm using the native packages provided by the distribution:
```puppet
class { '::nodejs':
manage_package_repo => false,
nodejs_dev_package_ensure => 'present',
npm_package_ensure => 'present',
nodejs_dev_package_ensure => installed,
npm_package_ensure => installed,
}
```

Install Node.js and npm using the packages from EPEL:

```puppet
class { '::nodejs':
nodejs_dev_package_ensure => 'present',
npm_package_ensure => 'present',
nodejs_dev_package_ensure => installed,
npm_package_ensure => installed,
repo_class => '::epel',
}
```

### Upgrades

The parameter `nodejs_package_ensure` defaults to `present`. Changing the
The parameter `nodejs_package_ensure` defaults to `insalled`. Changing the
`repo_url_suffix` will not result in a new version being installed. Changing
the `nodejs_package_ensure` parameter should provide the desired effect.

Expand Down Expand Up @@ -132,7 +132,7 @@ For example:

```puppet
package { 'express':
ensure => 'present',
ensure => installed,
provider => 'npm',
}
Expand Down Expand Up @@ -161,7 +161,7 @@ except version ranges. The title simply must be a unique, arbitrary value.
the package parameter needs to be match the name of the package in the npm
registry.
* Package versions are specified with the ensure parameter, which defaults to
`present`.
`installed`.
* Install options and uninstall options are also supported, and need to be
specified as an array.
* The user parameter is provided should you wish to run npm install or npm rm
Expand Down
10 changes: 5 additions & 5 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
$npmrc_auth = undef
$npmrc_config = undef
$nodejs_debug_package_ensure = 'absent'
$nodejs_package_ensure = 'present'
$nodejs_package_ensure = 'installed'
$repo_enable_src = false
$repo_ensure = 'present'
$repo_pin = undef
Expand Down Expand Up @@ -122,7 +122,7 @@
$nodejs_dev_package_name = 'nodejs-devel'
$nodejs_dev_package_ensure = 'absent'
$nodejs_package_name = 'nodejs'
$npm_package_ensure = 'present'
$npm_package_ensure = 'installed'
$npm_package_name = 'npm'
$npm_path = '/usr/bin/npm'
$repo_class = undef
Expand All @@ -134,7 +134,7 @@
$nodejs_dev_package_name = undef
$nodejs_dev_package_ensure = 'absent'
$nodejs_package_name = 'nodejs'
$npm_package_ensure = 'present'
$npm_package_ensure = 'installed'
$npm_package_name = 'npm'
$npm_path = '/usr/bin/npm'
$repo_class = undef
Expand All @@ -146,7 +146,7 @@
$nodejs_dev_package_name = 'www/node-devel'
$nodejs_dev_package_ensure = 'absent'
$nodejs_package_name = 'www/node'
$npm_package_ensure = 'present'
$npm_package_ensure = 'installed'
$npm_package_name = 'www/npm'
$npm_path = '/usr/local/bin/npm'
$repo_class = undef
Expand All @@ -170,7 +170,7 @@
$nodejs_dev_package_name = 'nodejs-devel'
$nodejs_dev_package_ensure = 'absent'
$nodejs_package_name = 'nodejs'
$npm_package_ensure = 'present'
$npm_package_ensure = 'installed'
$npm_package_name = 'npm'
$npm_path = '/opt/local/bin/npm'
$repo_class = undef
Expand Down
4 changes: 2 additions & 2 deletions spec/acceptance/class_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ class { 'nodejs': }
<<-PUPPET
class { 'nodejs':
manage_package_repo => false,
nodejs_dev_package_ensure => present,
npm_package_ensure => present,
nodejs_dev_package_ensure => installed,
npm_package_ensure => installed,
}
PUPPET
end
Expand Down
Loading

0 comments on commit c0ba860

Please sign in to comment.