Skip to content

Commit

Permalink
init: set package_ensure defaults to installed
Browse files Browse the repository at this point in the history
For compatibility with puppetlabs/puppetlabs-stdlib#1196.

Fixes #1522.
  • Loading branch information
kenyon committed Dec 1, 2022
1 parent 09562ec commit dc60d08
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1391,7 +1391,7 @@ Data type: `Any`



Default value: `present`
Default value: `installed`

##### <a name="-nginx--package_name"></a>`package_name`

Expand Down Expand Up @@ -1455,7 +1455,7 @@ Data type: `Any`



Default value: `'present'`
Default value: `installed`

##### <a name="-nginx--repo_source"></a>`repo_source`

Expand Down
4 changes: 2 additions & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -193,15 +193,15 @@
Optional[Enum['on', 'off']] $reset_timedout_connection = undef,

### START Package Configuration ###
$package_ensure = present,
$package_ensure = installed,
$package_name = $nginx::params::package_name,
$package_source = 'nginx',
$package_flavor = undef,
Boolean $manage_repo = $nginx::params::manage_repo,
Hash[String[1], String[1]] $mime_types = $nginx::params::mime_types,
Boolean $mime_types_preserve_defaults = false,
Optional[String] $repo_release = undef,
$passenger_package_ensure = 'present',
$passenger_package_ensure = installed,
String[1] $passenger_package_name = $nginx::params::passenger_package_name,
Optional[Stdlib::HTTPUrl] $repo_source = undef,
### END Package Configuration ###
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/nginx_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@

it { is_expected.to contain_yumrepo('passenger').that_comes_before('Package[nginx]') }
it { is_expected.to contain_yumrepo('nginx-release').that_comes_before('Package[nginx]') }
it { is_expected.to contain_package('passenger').with('ensure' => 'present') }
it { is_expected.to contain_package('passenger').with('ensure' => 'installed') }
end

describe 'installs the requested passenger package version', unless: facts[:operatingsystemmajrelease] == '8' do
Expand Down

0 comments on commit dc60d08

Please sign in to comment.