Skip to content

Commit

Permalink
Merge pull request #16 from SearchLightNZ/allow_specific_versions
Browse files Browse the repository at this point in the history
Allow package_ensure to specify specific versions
  • Loading branch information
fraenki committed Aug 21, 2023
2 parents a4ed39e + a5a347e commit b2dd5b4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# A hash of config key-value entries for master.cf
#
# @param package_ensure
# The state the postfix package should be ensured.
# The state or version the postfix package should be ensured.
#
# @param package_manage
# Whether to install the postfix and plugin packages.
Expand Down Expand Up @@ -59,7 +59,7 @@
Enum['installed', 'present', 'latest'] $mailx_ensure,
Boolean $mailx_manage,
String $mailx_package,
Enum['installed', 'present', 'latest'] $package_ensure,
Variant[String,Enum['installed', 'present', 'latest']] $package_ensure,
Boolean $package_manage,
String $package_name,
Hash $plugin,
Expand Down
6 changes: 6 additions & 0 deletions spec/classes/postfix_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@

it { is_expected.not_to contain_service('postfix') }
end

context 'with version string' do
let(:params) { { package_ensure: '1.2.3-4.el5' } }

it { is_expected.to contain_package('postfix').with_ensure('1.2.3-4.el5') }
end
end
end
end

0 comments on commit b2dd5b4

Please sign in to comment.