Skip to content

Commit

Permalink
Change default of version parameter to 'installed'
Browse files Browse the repository at this point in the history
  • Loading branch information
baurmatt committed Aug 15, 2018
1 parent e3c3773 commit 7749065
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,7 @@ Defaults to 'grafana-server'.

##### `version`

The version of Grafana to install and manage. Defaults to the latest version of
Grafana available at the time of module release.
The version of Grafana to install and manage. Defaults to 'installed'

##### `sysconfig_location`

Expand Down
4 changes: 2 additions & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
#
# [*version*]
# The version of Grafana to install and manage.
# Defaults to the latest version of Grafana available at the time of module release.
# Defaults to 'installed'
#
# [*repo_name*]
# When using 'repo' install_method, the repo to look for packages in.
Expand Down Expand Up @@ -122,7 +122,7 @@
Enum['stable', 'testing'] $repo_name = $::grafana::params::repo_name,
String $rpm_iteration = $::grafana::params::rpm_iteration,
String $service_name = $::grafana::params::service_name,
String $version = $::grafana::params::version,
String $version = 'installed',
Hash $plugins = {},
Hash $provisioning_dashboards = {},
Hash $provisioning_datasources = {},
Expand Down
2 changes: 1 addition & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
$package_name = 'grafana'
$rpm_iteration = '1'
$repo_name = 'stable'
$version = '4.5.1'
$create_subdirs_provisioning = false
$provisioning_dashboards_file = '/etc/grafana/provisioning/dashboards/puppetprovisioned.yaml'
$provisioning_datasources_file = '/etc/grafana/provisioning/datasources/puppetprovisioned.yaml'

case $facts['os']['family'] {
'Archlinux': {
$manage_package_repo = false
Expand Down
10 changes: 6 additions & 4 deletions spec/classes/grafana_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
context 'with parameter install_method is set to package' do
let(:params) do
{
install_method: 'package'
install_method: 'package',
version: '4.5.1',
}
end

Expand Down Expand Up @@ -108,7 +109,7 @@
end

describe 'install the package' do
it { is_expected.to contain_package('grafana').with_ensure('4.5.1') }
it { is_expected.to contain_package('grafana').with_ensure('installed') }
end
when 'RedHat'
describe 'yum repo dependencies first' do
Expand All @@ -121,7 +122,7 @@
end

describe 'install the package' do
it { is_expected.to contain_package('grafana').with_ensure('4.5.1-1') }
it { is_expected.to contain_package('grafana').with_ensure('installed') }
end
end
end
Expand Down Expand Up @@ -162,7 +163,8 @@
context 'with parameter install_method is set to archive' do
let(:params) do
{
install_method: 'archive'
install_method: 'archive',
version: '4.5.1',
}
end

Expand Down

0 comments on commit 7749065

Please sign in to comment.