Install the version that is coming with the plugin
Version 0.11.1-1 is provided by the plugin, so to avoid problems with priorities or conflicts with other version we need to fix the version to the one that we are shippping. Change-Id: I22923a6bbccb0f1b43ebfd6fece9891081cbb30c
This commit is contained in:
parent
a7ea29f6d9
commit
5ef7a53504
@ -44,5 +44,6 @@ class { 'lma_monitoring_analytics::influxdb':
|
||||
base_directory => $data_directory,
|
||||
hostname => hiera('lma::influxdb::listen_address'),
|
||||
raft_nodes => $raft_nodes,
|
||||
version => '0.11.1-1',
|
||||
require => File[$data_directory],
|
||||
}
|
||||
|
@ -20,12 +20,20 @@ class influxdb (
|
||||
$meta_dir = $influxdb::params::meta_dir,
|
||||
$wal_dir = $influxdb::params::wal_dir,
|
||||
$snapshot = $influxdb::params::snapshot,
|
||||
$version = undef,
|
||||
$hostname = undef,
|
||||
$raft_nodes = undef,
|
||||
) inherits influxdb::params {
|
||||
|
||||
if $version {
|
||||
$use_version = $version
|
||||
} else {
|
||||
$use_version = 'latest'
|
||||
}
|
||||
|
||||
class {'influxdb::install':
|
||||
raft_nodes => $raft_nodes,
|
||||
raft_nodes => $raft_nodes,
|
||||
version => $use_version,
|
||||
}
|
||||
|
||||
class {'influxdb::service':
|
||||
|
@ -15,11 +15,12 @@
|
||||
# == Class: influxdb::install
|
||||
|
||||
class influxdb::install (
|
||||
$raft_nodes = undef,
|
||||
$raft_nodes = undef,
|
||||
$version = 'latest',
|
||||
) {
|
||||
|
||||
package { 'influxdb':
|
||||
ensure => installed,
|
||||
ensure => $version,
|
||||
}
|
||||
|
||||
if $raft_nodes {
|
||||
|
@ -20,7 +20,15 @@ describe 'influxdb::install' do
|
||||
end
|
||||
|
||||
describe 'with defaults' do
|
||||
it { is_expected.to contain_package('influxdb').with_ensure('installed') }
|
||||
it { is_expected.to contain_package('influxdb').with_ensure('latest') }
|
||||
it { is_expected.to have_file_count(0) }
|
||||
end
|
||||
|
||||
describe 'with version' do
|
||||
let (:params) do
|
||||
{:version => '0.1.2.3'}
|
||||
end
|
||||
it { is_expected.to contain_package('influxdb').with_ensure('0.1.2.3') }
|
||||
it { is_expected.to have_file_count(0) }
|
||||
end
|
||||
|
||||
@ -28,7 +36,7 @@ describe 'influxdb::install' do
|
||||
let(:params) do
|
||||
{:raft_nodes => ['node-1', 'node-2']}
|
||||
end
|
||||
it { is_expected.to contain_package('influxdb').with_ensure('installed') }
|
||||
it { is_expected.to contain_package('influxdb').with_ensure('latest') }
|
||||
it { is_expected.to contain_file('/etc/default/influxdb') }
|
||||
end
|
||||
end
|
||||
|
@ -18,6 +18,7 @@ class lma_monitoring_analytics::influxdb (
|
||||
$base_directory = $lma_monitoring_analytics::params::influxdb_dir,
|
||||
$hostname = undef,
|
||||
$raft_nodes = undef,
|
||||
$version = undef,
|
||||
) inherits lma_monitoring_analytics::params {
|
||||
|
||||
if $raft_nodes {
|
||||
@ -32,5 +33,6 @@ class lma_monitoring_analytics::influxdb (
|
||||
snapshot => true,
|
||||
hostname => $hostname,
|
||||
raft_nodes => $raft_nodes,
|
||||
version => $version,
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user