From d33a208ffda781246f305d4b1ad95d811902366d Mon Sep 17 00:00:00 2001 From: Duncan Gibb Date: Thu, 28 May 2020 10:38:08 +0100 Subject: [PATCH 1/2] InfluxData now support Buster, but not yet Bullseye; update dist codename hack. --- manifests/repos.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/repos.pp b/manifests/repos.pp index 470ceb4..575c9ef 100644 --- a/manifests/repos.pp +++ b/manifests/repos.pp @@ -13,7 +13,7 @@ case $::operatingsystem { /(?i:debian|devuan|ubuntu)/: { case $::lsbdistcodename { - /(buster|n\/a)/ : { + /(bullseye|n\/a)/ : { if !defined(Class['apt']) { include apt } @@ -21,7 +21,7 @@ apt::source { 'influxdb': ensure => present, location => $apt_location, - release => 'jessie', + release => 'buster', repos => 'stable', key => $apt_key, notify => Exec['apt_update'] From a9018a873c08069e86bb68bcc59cf4f56c1d6255 Mon Sep 17 00:00:00 2001 From: Duncan Gibb Date: Thu, 28 May 2020 11:13:06 +0100 Subject: [PATCH 2/2] InfluxData package server and client together on Debian/Ubuntu; distro-native packaging splits them. Make this configurable. --- manifests/init.pp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index b6ec760..dd3fdf8 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -7,6 +7,7 @@ $service = true, $enable = true, $manage_repo = true, + $split_client_package = false, $apt_location = $influxdb::params::apt_location, $apt_release = $influxdb::params::apt_release, $apt_repos = $influxdb::params::apt_repos, @@ -47,6 +48,12 @@ $graphite_templates = $influxdb::params::graphite_templates ) inherits influxdb::params { + case $split_client_package { + true : { $package_names = $influxdb_package_name } + false : { $package_names = [$influxdb_package_name[0]] } + default : { fail('split_client_package package must be true (if using Debian/Ubuntu distro packages) or false') } + } + case $package { true : { $ensure_package = 'present' } false : { $ensure_package = 'purged' } @@ -67,17 +74,17 @@ apt_release => $apt_release, apt_repos => $apt_repos, apt_key => $apt_key, - influxdb_package_name => $influxdb_package_name, + influxdb_package_name => $package_names, influxdb_service_name => $influxdb_service_name, } - package { $influxdb_package_name[0]: + package { $package_names: ensure => $ensure_package, require => Class['influxdb::repos'], } } else { - package { $influxdb_package_name: + package { $package_names: ensure => $ensure_package } } @@ -88,7 +95,7 @@ hasrestart => true, hasstatus => true, provider => $influxdb_service_provider, - require => Package[$influxdb_package_name[0]], + require => Package[$package_names[0]], } if $ensure_service == 'running' {