From f2935aa0eaab3fe1c2e688202fa97dcd4cf8e17c Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Thu, 3 Dec 2020 10:41:38 +0100 Subject: [PATCH] puppetdb_exporter: Update 1.0.0->1.1.0 --- REFERENCE.md | 16 ++++++++++++---- manifests/puppetdb_exporter.pp | 2 +- spec/classes/puppetdb_exporter_spec.rb | 9 +++++---- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index 38ce572f0..526b79c7c 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -72,7 +72,7 @@ This can be used to make prometheus find instances of your running service or ap ### `prometheus` -This module manages prometheus. +This module manages prometheus #### Parameters @@ -1674,6 +1674,14 @@ The binary release version Default value: `'1.2.4'` +##### `env_vars` + +Data type: `Hash[String[1], Scalar]` + +hash with custom environment variables thats passed to the exporter via init script / unit file + +Default value: `{}` + ##### `export_scrape_job` Data type: `Boolean` @@ -5942,7 +5950,7 @@ Data type: `String[1]` The binary release version -Default value: `'1.0.0'` +Default value: `'1.1.0'` ##### `puppetdb_url` @@ -8390,7 +8398,7 @@ Default value: `''` ##### `env_vars` -Data type: `Hash[String, Scalar]` +Data type: `Hash[String[1], Scalar]` @@ -8504,7 +8512,7 @@ Alias of `Pattern[/^gs:\/\//]` The Prometheus::Initstyle data type. -Alias of `Enum['sysv', 'redhat', 'systemd', 'sles', 'debian', 'launchd', 'upstart', 'none']` +Alias of `Enum['sysv', 'systemd', 'sles', 'launchd', 'upstart', 'none']` ### `Prometheus::Install` diff --git a/manifests/puppetdb_exporter.pp b/manifests/puppetdb_exporter.pp index d7614aaec..fd72938ce 100644 --- a/manifests/puppetdb_exporter.pp +++ b/manifests/puppetdb_exporter.pp @@ -55,7 +55,7 @@ String[1] $package_ensure = 'present', String[1] $package_name = 'puppetdb_exporter', String[1] $user = 'puppetdb-exporter', - String[1] $version = '1.0.0', + String[1] $version = '1.1.0', Boolean $purge_config_dir = true, Boolean $restart_on_change = true, Boolean $service_enable = true, diff --git a/spec/classes/puppetdb_exporter_spec.rb b/spec/classes/puppetdb_exporter_spec.rb index 636b41c84..c1eef403a 100644 --- a/spec/classes/puppetdb_exporter_spec.rb +++ b/spec/classes/puppetdb_exporter_spec.rb @@ -13,11 +13,11 @@ if facts[:os]['name'] == 'Archlinux' it { is_expected.to contain_package('puppetdb_exporter') } it { is_expected.not_to contain_file('/usr/local/bin/puppetdb_exporter') } - it { is_expected.not_to contain_archive('/tmp/puppetdb_exporter-1.0.0.tar.gz') } + it { is_expected.not_to contain_archive('/tmp/puppetdb_exporter-1.1.0.tar.gz') } else - it { is_expected.to contain_archive('/tmp/puppetdb_exporter-1.0.0.tar.gz') } - it { is_expected.to contain_file('/usr/local/bin/puppetdb_exporter').with('target' => '/opt/prometheus-puppetdb-exporter-1.0.0.linux-amd64/prometheus-puppetdb-exporter') } - it { is_expected.to contain_file('/opt/prometheus-puppetdb-exporter-1.0.0.linux-amd64/prometheus-puppetdb-exporter') } + it { is_expected.to contain_archive('/tmp/puppetdb_exporter-1.1.0.tar.gz') } + it { is_expected.to contain_file('/usr/local/bin/puppetdb_exporter').with('target' => '/opt/prometheus-puppetdb-exporter-1.1.0.linux-amd64/prometheus-puppetdb-exporter') } + it { is_expected.to contain_file('/opt/prometheus-puppetdb-exporter-1.1.0.linux-amd64/prometheus-puppetdb-exporter') } it { is_expected.not_to contain_package('puppetdb_exporter') } end it { is_expected.to contain_prometheus__daemon('puppetdb_exporter') } @@ -25,6 +25,7 @@ it { is_expected.to contain_group('puppetdb-exporter') } it { is_expected.to contain_service('puppetdb_exporter') } it { is_expected.to contain_class('prometheus') } + it { is_expected.to contain_systemd__unit_file('puppetdb_exporter.service') } end end end