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

Allow to specify package version and revision for ensure parameter #5

Merged
merged 2 commits into from
Mar 27, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 6 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ In order to explicitly ensure that version 5.2.0 of Kibana is installed:
class { 'kibana': ensure => '5.2.0' }
```

Package revisions are supported too:

```puppet
class { 'kibana': ensure => '5.2.2-1' }
```

The `kibana` class also supports removal through use of `ensure => absent`:

```puppet
Expand Down
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# @param repo_version Repository major version to use
#
class kibana (
Variant[Enum['present', 'absent', 'latest'], Pattern[/^\d([.]\d+)*$/]] $ensure = 'present',
Variant[Enum['present', 'absent', 'latest'], Pattern[/^\d([.]\d+)*(-[\d+\w+])$/]] $ensure = 'present',
Hash[String[1], Variant[String[1], Integer, Boolean, Array]] $config = {},
Boolean $manage_repo = true,
String $repo_key_id = '46095ACC8548582C1A2699A9D27D666CD88E42B4',
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/kibana_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
describe 'parameter validation for' do
describe 'ensure' do
context 'valid parameter' do
%w(present absent latest 5.2.1).each do |param|
%w(present absent latest 5.2.1 5.2.2-1).each do |param|
context param do
let(:params) { { :ensure => param } }
it { should compile.with_all_deps }
Expand Down