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

Extend puppet type check for install_method #492

Merged
merged 1 commit into from Sep 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
283 changes: 257 additions & 26 deletions REFERENCE.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion manifests/apache_exporter.pp
Expand Up @@ -65,7 +65,7 @@
Stdlib::Ensure::Service $service_ensure = 'running',
String[1] $service_name = 'apache_exporter',
Prometheus::Initstyle $init_style = $facts['service_provider'],
String[1] $install_method = $prometheus::install_method,
Prometheus::Install $install_method = $prometheus::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
Expand Down
2 changes: 1 addition & 1 deletion manifests/beanstalkd_exporter.pp
Expand Up @@ -72,7 +72,7 @@
Boolean $service_enable = true,
Stdlib::Ensure::Service $service_ensure = 'running',
Prometheus::Initstyle $init_style = $facts['service_provider'],
String[1] $install_method = $prometheus::install_method,
Prometheus::Install $install_method = $prometheus::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
Expand Down
2 changes: 1 addition & 1 deletion manifests/bird_exporter.pp
Expand Up @@ -67,7 +67,7 @@
Stdlib::Ensure::Service $service_ensure = 'running',
String[1] $service_name = 'bird_exporter',
Prometheus::Initstyle $init_style = $facts['service_provider'],
String[1] $install_method = 'url',
Prometheus::Install $install_method = 'url',
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
Expand Down
4 changes: 3 additions & 1 deletion manifests/blackbox_exporter.pp
Expand Up @@ -47,6 +47,8 @@
# User which runs the service
# @param version
# The binary release version
# @param config_mode
# The permissions of the configuration files
# Example for configuring named blackbox modules via hiera
# details of the format: https://github.com/prometheus/blackbox_exporter/blob/master/CONFIGURATION.md
# @example
Expand Down Expand Up @@ -75,7 +77,7 @@
Stdlib::Ensure::Service $service_ensure = 'running',
String[1] $service_name = 'blackbox_exporter',
Prometheus::Initstyle $init_style = $facts['service_provider'],
String[1] $install_method = $prometheus::install_method,
Prometheus::Install $install_method = $prometheus::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
Expand Down
2 changes: 1 addition & 1 deletion manifests/collectd_exporter.pp
Expand Up @@ -55,7 +55,7 @@
String $options,
String[1] $os = downcase($facts['kernel']),
Prometheus::Initstyle $init_style = $facts['service_provider'],
String[1] $install_method = $prometheus::install_method,
Prometheus::Install $install_method = $prometheus::install_method,
Optional[String[1]] $download_url = undef,
String[1] $arch = $prometheus::real_arch,
String[1] $bin_dir = $prometheus::bin_dir,
Expand Down
4 changes: 2 additions & 2 deletions manifests/consul_exporter.pp
Expand Up @@ -79,11 +79,11 @@
Boolean $manage_user = true,
String[1] $os = downcase($facts['kernel']),
Prometheus::Initstyle $init_style = $facts['service_provider'],
String[1] $install_method = $prometheus::install_method,
Prometheus::Install $install_method = $prometheus::install_method,
String $extra_options = '',
Optional[String] $download_url = undef,
String[1] $arch = $prometheus::real_arch,
String[1] $bin_dir = $prometheus::bin_dir,
String[1] $bin_dir = $prometheus::bin_dir,
Boolean $export_scrape_job = false,
Optional[Stdlib::Host] $scrape_host = undef,
Stdlib::Port $scrape_port = 9107,
Expand Down
8 changes: 3 additions & 5 deletions manifests/daemon.pp
Expand Up @@ -51,7 +51,7 @@
$notify_service,
String[1] $user,
String[1] $group,
String[1] $install_method = $prometheus::install_method,
Prometheus::Install $install_method = $prometheus::install_method,
String $download_extension = $prometheus::download_extension,
String[1] $os = $prometheus::os,
String[1] $arch = $prometheus::real_arch,
Expand All @@ -72,7 +72,7 @@
Optional[String] $env_file_path = $prometheus::env_file_path,
Optional[String[1]] $extract_command = $prometheus::extract_command,
Stdlib::Absolutepath $extract_path = '/opt',
Stdlib::Absolutepath $archive_bin_path = "/opt/${name}-${version}.${os}-${arch}/${name}",
Stdlib::Absolutepath $archive_bin_path = "/opt/${name}-${version}.${os}-${arch}/${name}",
Boolean $export_scrape_job = false,
Stdlib::Host $scrape_host = $facts['networking']['fqdn'],
Optional[Stdlib::Port] $scrape_port = undef,
Expand Down Expand Up @@ -129,9 +129,7 @@
}
}
'none': {}
default: {
fail("The provided install method ${install_method} is invalid")
}
default: {}
bastelfreak marked this conversation as resolved.
Show resolved Hide resolved
}
if $manage_user {
# if we manage the service, we need to reload it if our user changes
Expand Down
2 changes: 1 addition & 1 deletion manifests/dellhw_exporter.pp
Expand Up @@ -64,7 +64,7 @@
Stdlib::Ensure::Service $service_ensure = 'running',
String[1] $service_name = 'dellhw_exporter',
Prometheus::Initstyle $init_style = $facts['service_provider'],
String[1] $install_method = $prometheus::install_method,
Prometheus::Install $install_method = $prometheus::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
Expand Down
2 changes: 1 addition & 1 deletion manifests/elasticsearch_exporter.pp
Expand Up @@ -69,7 +69,7 @@
Boolean $service_enable = true,
Stdlib::Ensure::Service $service_ensure = 'running',
Prometheus::Initstyle $init_style = $facts['service_provider'],
String[1] $install_method = $prometheus::install_method,
Prometheus::Install $install_method = $prometheus::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
Expand Down
2 changes: 1 addition & 1 deletion manifests/graphite_exporter.pp
Expand Up @@ -55,7 +55,7 @@
String $options,
String[1] $os = downcase($facts['kernel']),
Prometheus::Initstyle $init_style = $facts['service_provider'],
String[1] $install_method = $prometheus::install_method,
Prometheus::Install $install_method = $prometheus::install_method,
Optional[String] $download_url = undef,
String[1] $arch = $prometheus::real_arch,
String[1] $bin_dir = $prometheus::bin_dir,
Expand Down
2 changes: 1 addition & 1 deletion manifests/grok_exporter.pp
Expand Up @@ -69,7 +69,7 @@
Stdlib::Ensure::Service $service_ensure = 'running',
String[1] $service_name = 'grok_exporter',
Prometheus::Initstyle $init_style = $facts['service_provider'],
String[1] $install_method = $prometheus::install_method,
Prometheus::Install $install_method = $prometheus::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
Expand Down
2 changes: 1 addition & 1 deletion manifests/haproxy_exporter.pp
Expand Up @@ -63,7 +63,7 @@
Boolean $service_enable = true,
Stdlib::Ensure::Service $service_ensure = 'running',
Prometheus::Initstyle $init_style = $facts['service_provider'],
String[1] $install_method = $prometheus::install_method,
Prometheus::Install $install_method = $prometheus::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
Expand Down
2 changes: 1 addition & 1 deletion manifests/memcached_exporter.pp
Expand Up @@ -60,7 +60,7 @@
Stdlib::Ensure::Service $service_ensure = 'running',
String[1] $service_name = 'memcached_exporter',
Prometheus::Initstyle $init_style = $facts['service_provider'],
String[1] $install_method = $prometheus::install_method,
Prometheus::Install $install_method = $prometheus::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
Expand Down
2 changes: 1 addition & 1 deletion manifests/mesos_exporter.pp
Expand Up @@ -66,7 +66,7 @@
Boolean $service_enable = true,
Stdlib::Ensure::Service $service_ensure = 'running',
Prometheus::Initstyle $init_style = $facts['service_provider'],
String[1] $install_method = $prometheus::install_method,
Prometheus::Install $install_method = $prometheus::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
Expand Down
2 changes: 1 addition & 1 deletion manifests/mongodb_exporter.pp
Expand Up @@ -68,7 +68,7 @@
Boolean $service_enable = true,
Stdlib::Ensure::Service $service_ensure = 'running',
Prometheus::Initstyle $init_style = $facts['service_provider'],
String[1] $install_method = $prometheus::install_method,
Prometheus::Install $install_method = $prometheus::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
Expand Down
2 changes: 1 addition & 1 deletion manifests/mysqld_exporter.pp
Expand Up @@ -81,7 +81,7 @@
Boolean $service_enable = true,
Stdlib::Ensure::Service $service_ensure = 'running',
Prometheus::Initstyle $init_style = $facts['service_provider'],
String[1] $install_method = $prometheus::install_method,
Prometheus::Install $install_method = $prometheus::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
Expand Down
2 changes: 1 addition & 1 deletion manifests/node_exporter.pp
Expand Up @@ -69,7 +69,7 @@
Stdlib::Ensure::Service $service_ensure = 'running',
String[1] $service_name = 'node_exporter',
Prometheus::Initstyle $init_style = $facts['service_provider'],
String[1] $install_method = $prometheus::install_method,
Prometheus::Install $install_method = $prometheus::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
Expand Down
2 changes: 1 addition & 1 deletion manifests/postgres_exporter.pp
Expand Up @@ -73,7 +73,7 @@
Stdlib::Ensure::Service $service_ensure = 'running',
String[1] $service_name = 'postgres_exporter',
Prometheus::Initstyle $init_style = $facts['service_provider'],
String[1] $install_method = $prometheus::install_method,
Prometheus::Install $install_method = $prometheus::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
Expand Down
2 changes: 1 addition & 1 deletion manifests/process_exporter.pp
Expand Up @@ -88,7 +88,7 @@
Boolean $service_enable = true,
Stdlib::Ensure::Service $service_ensure = 'running',
Prometheus::Initstyle $init_style = $facts['service_provider'],
String[1] $install_method = $prometheus::install_method,
Prometheus::Install $install_method = $prometheus::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
Expand Down
2 changes: 1 addition & 1 deletion manifests/puppetdb_exporter.pp
Expand Up @@ -62,7 +62,7 @@
Stdlib::Ensure::Service $service_ensure = 'running',
String[1] $service_name = 'puppetdb_exporter',
Prometheus::Initstyle $init_style = $facts['service_provider'],
String[1] $install_method = $prometheus::install_method,
Prometheus::Install $install_method = $prometheus::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
Expand Down
2 changes: 1 addition & 1 deletion manifests/rabbitmq_exporter.pp
Expand Up @@ -86,7 +86,7 @@
Optional[String] $download_url = undef,
String $extra_options = '',
Prometheus::Initstyle $init_style = $facts['service_provider'],
String[1] $install_method = $prometheus::install_method,
Prometheus::Install $install_method = $prometheus::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
Expand Down
2 changes: 1 addition & 1 deletion manifests/redis_exporter.pp
Expand Up @@ -67,7 +67,7 @@
Stdlib::Ensure::Service $service_ensure = 'running',
String[1] $service_name = 'redis_exporter',
Prometheus::Initstyle $init_style = $facts['service_provider'],
String[1] $install_method = $prometheus::install_method,
Prometheus::Install $install_method = $prometheus::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
Expand Down
2 changes: 1 addition & 1 deletion manifests/snmp_exporter.pp
Expand Up @@ -68,7 +68,7 @@
Boolean $service_enable = true,
Stdlib::Ensure::Service $service_ensure = 'running',
Prometheus::Initstyle $init_style = $facts['service_provider'],
String[1] $install_method = $prometheus::install_method,
Prometheus::Install $install_method = $prometheus::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
Expand Down
2 changes: 1 addition & 1 deletion manifests/statsd_exporter.pp
Expand Up @@ -75,7 +75,7 @@
Stdlib::Ensure::Service $service_ensure = 'running',
String[1] $os = downcase($facts['kernel']),
Prometheus::Initstyle $init_style = $facts['service_provider'],
String[1] $install_method = $prometheus::install_method,
Prometheus::Install $install_method = $prometheus::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
Expand Down
2 changes: 1 addition & 1 deletion manifests/varnish_exporter.pp
Expand Up @@ -60,7 +60,7 @@
Boolean $service_enable = true,
Stdlib::Ensure::Service $service_ensure = 'running',
Prometheus::Initstyle $init_style = $facts['service_provider'],
String[1] $install_method = $prometheus::install_method,
Prometheus::Install $install_method = $prometheus::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
Expand Down
2 changes: 2 additions & 0 deletions types/install.pp
@@ -0,0 +1,2 @@
# @summary type to enforce the different installation methods for our exporters.
type Prometheus::Install = Enum['url', 'package', 'none']