Skip to content

Commit

Permalink
Merge pull request voxpupuli#409 from bastelfreak/data3
Browse files Browse the repository at this point in the history
move more static data from hiera to module
  • Loading branch information
bastelfreak authored Jan 6, 2020
2 parents f2b27cd + a499d39 commit ce36000
Show file tree
Hide file tree
Showing 30 changed files with 148 additions and 138 deletions.
156 changes: 88 additions & 68 deletions REFERENCE.md

Large diffs are not rendered by default.

10 changes: 0 additions & 10 deletions data/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
prometheus::usershell: '/usr/bin/nologin'
prometheus::extra_options: ~
prometheus::download_url: ~
prometheus::arch: '%{facts.architecture}'
prometheus::manage_group: true
prometheus::purge_config_dir: true
prometheus::manage_user: true
prometheus::bin_dir: '/usr/local/bin'
prometheus::version: '2.14.0'
prometheus::install_method: 'url'
Expand Down Expand Up @@ -290,9 +286,6 @@ prometheus::graphite_exporter::package_ensure: 'latest'
prometheus::graphite_exporter::package_name: 'graphite_exporter'
prometheus::graphite_exporter::user: 'graphite-exporter'
prometheus::graphite_exporter::version: '0.2.0'
prometheus::graphite_exporter::purge_config_dir: true
prometheus::graphite_exporter::manage_group: true
prometheus::graphite_exporter::manage_user: true
prometheus::graphite_exporter::options: ''
prometheus::collectd_exporter::download_extension: 'tar.gz'
prometheus::collectd_exporter::download_url_base: 'https://github.com/prometheus/collectd_exporter/releases'
Expand All @@ -301,9 +294,6 @@ prometheus::collectd_exporter::package_ensure: 'latest'
prometheus::collectd_exporter::package_name: 'collectd_exporter'
prometheus::collectd_exporter::user: 'collectd-exporter'
prometheus::collectd_exporter::version: '0.4.0'
prometheus::collectd_exporter::purge_config_dir: true
prometheus::collectd_exporter::manage_group: true
prometheus::collectd_exporter::manage_user: true
prometheus::collectd_exporter::options: ''
prometheus::apache_exporter::scrape_uri: 'http://localhost/server-status?auto'
prometheus::apache_exporter::download_extension: 'tar.gz'
Expand Down
4 changes: 2 additions & 2 deletions manifests/alertmanager.pp
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
String $os = $prometheus::os,
String[1] $os = $prometheus::os,
String $extra_options = '',
Optional[String] $download_url = undef,
String $config_mode = $prometheus::config_mode,
String $arch = $prometheus::real_arch,
String[1] $arch = $prometheus::real_arch,
Stdlib::Absolutepath $bin_dir = $prometheus::bin_dir,
) inherits prometheus {

Expand Down
2 changes: 1 addition & 1 deletion manifests/apache_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
String[1] $os = $prometheus::os,
String[1] $os = downcase($facts['kernel']),
String $extra_options = '',
Optional[Prometheus::Uri] $download_url = undef,
String[1] $config_mode = $prometheus::config_mode,
Expand Down
4 changes: 2 additions & 2 deletions manifests/beanstalkd_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
String $os = $prometheus::os,
String[1] $os = downcase($facts['kernel']),
String $extra_options = '',
Variant[Undef,String] $download_url = undef,
String $arch = $prometheus::real_arch,
String[1] $arch = $prometheus::real_arch,
String $bin_dir = $prometheus::bin_dir,
Boolean $export_scrape_job = false,
Stdlib::Port $scrape_port = 8080,
Expand Down
4 changes: 2 additions & 2 deletions manifests/bird_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
String $os = $prometheus::os,
String[1] $os = downcase($facts['kernel']),
String $extra_options = '-bird.v2 -web.listen-address=127.0.0.1:9324 -format.new=true',
Optional[String] $download_url = undef,
String $arch = $prometheus::real_arch,
String[1] $arch = $prometheus::real_arch,
String $bin_dir = '/usr/local/bin',
Boolean $export_scrape_job = false,
Stdlib::Port $scrape_port = 9324,
Expand Down
4 changes: 2 additions & 2 deletions manifests/blackbox_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
String $os = $prometheus::os,
String[1] $os = downcase($facts['kernel']),
String $extra_options = '',
Optional[String] $download_url = undef,
String $config_mode = $prometheus::config_mode,
String $arch = $prometheus::real_arch,
String[1] $arch = $prometheus::real_arch,
String $bin_dir = $prometheus::bin_dir,
Hash $modules = {},
Boolean $export_scrape_job = false,
Expand Down
8 changes: 4 additions & 4 deletions manifests/collectd_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,8 @@
String[1] $package_name,
String[1] $user,
String[1] $version,
Boolean $purge_config_dir,
Boolean $manage_group,
Boolean $manage_user,
String $options,
String[1] $os = $prometheus::os,
String[1] $os = downcase($facts['kernel']),
Prometheus::Initstyle $init_style = $facts['service_provider'],
String[1] $install_method = $prometheus::install_method,
Optional[String[1]] $download_url = undef,
Expand All @@ -67,6 +64,9 @@
Boolean $manage_service = true,
Stdlib::Ensure::Service $service_ensure = 'running',
Boolean $restart_on_change = true,
Boolean $purge_config_dir = true,
Boolean $manage_user = true,
Boolean $manage_group = true,
) inherits prometheus {

$real_download_url = pick($download_url,"${download_url_base}/download/v${version}/${package_name}-${version}.${os}-${arch}.${download_extension}")
Expand Down
4 changes: 2 additions & 2 deletions manifests/consul_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
String $os = $prometheus::os,
String[1] $os = downcase($facts['kernel']),
Prometheus::Initstyle $init_style = $facts['service_provider'],
String $install_method = $prometheus::install_method,
String $extra_options = '',
Optional[String] $download_url = undef,
String $arch = $prometheus::real_arch,
String[1] $arch = $prometheus::real_arch,
String $bin_dir = $prometheus::bin_dir,
Boolean $export_scrape_job = false,
Stdlib::Port $scrape_port = 9107,
Expand Down
4 changes: 2 additions & 2 deletions manifests/daemon.pp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
String[1] $group,
String $install_method = $prometheus::install_method,
String $download_extension = $prometheus::download_extension,
String $os = $prometheus::os,
String $arch = $prometheus::real_arch,
String[1] $os = $prometheus::os,
String[1] $arch = $prometheus::real_arch,
Stdlib::Absolutepath $bin_dir = $prometheus::bin_dir,
String $bin_name = $name,
Optional[String] $package_name = undef,
Expand Down
4 changes: 2 additions & 2 deletions manifests/elasticsearch_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
String $os = $prometheus::os,
String[1] $os = downcase($facts['kernel']),
String $extra_options = '',
Optional[String] $download_url = undef,
String $arch = $prometheus::real_arch,
String[1] $arch = $prometheus::real_arch,
String $bin_dir = $prometheus::bin_dir,
Boolean $export_scrape_job = false,
Stdlib::Port $scrape_port = 9114,
Expand Down
10 changes: 5 additions & 5 deletions manifests/graphite_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,12 @@
String $package_name,
String $user,
String $version,
Boolean $purge_config_dir,
Boolean $manage_group,
Boolean $manage_user,
String $options,
String $os = $prometheus::os,
String[1] $os = downcase($facts['kernel']),
Prometheus::Initstyle $init_style = $facts['service_provider'],
String $install_method = $prometheus::install_method,
Optional[String] $download_url = undef,
String $arch = $prometheus::real_arch,
String[1] $arch = $prometheus::real_arch,
String $bin_dir = $prometheus::bin_dir,
Boolean $export_scrape_job = false,
Stdlib::Port $scrape_port = 9108,
Expand All @@ -67,6 +64,9 @@
Boolean $manage_service = true,
Stdlib::Ensure::Service $service_ensure = 'running',
Boolean $restart_on_change = true,
Boolean $purge_config_dir = true,
Boolean $manage_user = true,
Boolean $manage_group = true,
) inherits prometheus {

$real_download_url = pick($download_url,"${download_url_base}/download/v${version}/${package_name}-${version}.${os}-${arch}.${download_extension}")
Expand Down
4 changes: 2 additions & 2 deletions manifests/haproxy_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
String $os = $prometheus::os,
String[1] $os = downcase($facts['kernel']),
String $extra_options = '',
Optional[String] $download_url = undef,
String $arch = $prometheus::real_arch,
String[1] $arch = $prometheus::real_arch,
Stdlib::Absolutepath $bin_dir = $prometheus::bin_dir,
Boolean $export_scrape_job = false,
Stdlib::Port $scrape_port = 9101,
Expand Down
10 changes: 5 additions & 5 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,6 @@
Boolean $manage_prometheus_server,
Optional[String[1]] $extra_options,
Optional[String] $download_url,
String $arch,
Boolean $manage_group,
Boolean $purge_config_dir,
Boolean $manage_user,
Optional[String[1]] $extract_command,
Boolean $manage_config,
Stdlib::Absolutepath $usershell,
Expand Down Expand Up @@ -278,7 +274,7 @@
Hash $extra_alerts = {},
Hash $config_hash = {},
Hash $config_defaults = {},
String $os = downcase($facts['kernel']),
String[1] $os = downcase($facts['kernel']),
Optional[Variant[Stdlib::HTTPUrl, Stdlib::Unixpath, String[1]]] $external_url = undef,
Optional[Array[Hash[String[1], Any]]] $collect_scrape_jobs = [],
Optional[Integer] $max_open_files = undef,
Expand All @@ -288,6 +284,10 @@
Stdlib::Ensure::Service $service_ensure = 'running',
Boolean $restart_on_change = true,
Prometheus::Initstyle $init_style = $facts['service_provider'],
String[1] $arch = $facts['os']['architecture'],
Boolean $manage_group = true,
Boolean $purge_config_dir = true,
Boolean $manage_user = true,
) {

case $arch {
Expand Down
4 changes: 2 additions & 2 deletions manifests/mesos_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
String $os = $prometheus::os,
String[1] $os = downcase($facts['kernel']),
String $extra_options = '',
Optional[String] $download_url = undef,
String $arch = $prometheus::real_arch,
String[1] $arch = $prometheus::real_arch,
String $bin_dir = $prometheus::bin_dir,
Boolean $export_scrape_job = false,
Stdlib::Port $scrape_port = 9105,
Expand Down
4 changes: 2 additions & 2 deletions manifests/mongodb_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
String $os = $prometheus::os,
String[1] $os = downcase($facts['kernel']),
String $extra_options = '',
Optional[String] $download_url = undef,
String $arch = $prometheus::real_arch,
String[1] $arch = $prometheus::real_arch,
String $bin_dir = $prometheus::bin_dir,
Boolean $export_scrape_job = false,
Stdlib::Port $scrape_port = 9216,
Expand Down
4 changes: 2 additions & 2 deletions manifests/mysqld_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
String $os = $prometheus::os,
String[1] $os = downcase($facts['kernel']),
String $extra_options = '',
Optional[Prometheus::Uri] $download_url = undef,
String $config_mode = $prometheus::config_mode,
String $arch = $prometheus::real_arch,
String[1] $arch = $prometheus::real_arch,
Stdlib::Absolutepath $bin_dir = $prometheus::bin_dir,
Boolean $export_scrape_job = false,
Stdlib::Port $scrape_port = 9104,
Expand Down
2 changes: 1 addition & 1 deletion manifests/nginx_vts_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
String $os = $prometheus::os,
String $os = downcase($facts['kernel']),
String $extra_options = '',
Optional[String] $download_url = undef,
String $arch = $prometheus::real_arch,
Expand Down
4 changes: 2 additions & 2 deletions manifests/node_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
String $os = $prometheus::os,
String[1] $os = downcase($facts['kernel']),
String $extra_options = '',
Optional[String] $download_url = undef,
String $arch = $prometheus::real_arch,
String[1] $arch = $prometheus::real_arch,
String $bin_dir = $prometheus::bin_dir,
Optional[Array[String]] $collectors = undef,
Array[String] $collectors_enable = [],
Expand Down
2 changes: 1 addition & 1 deletion manifests/postgres_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
String[1] $os = $prometheus::os,
String[1] $os = downcase($facts['kernel']),
String $options = '',
Optional[String] $download_url = undef,
Optional[String] $postgres_pass = undef,
Expand Down
4 changes: 2 additions & 2 deletions manifests/process_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
String $os = $prometheus::os,
String[1] $os = downcase($facts['kernel']),
String $extra_options = '',
String $config_mode = $prometheus::config_mode,
Optional[Prometheus::Uri] $download_url = undef,
String $arch = $prometheus::real_arch,
String[1] $arch = $prometheus::real_arch,
Stdlib::Absolutepath $bin_dir = $prometheus::bin_dir,
Boolean $export_scrape_job = false,
Stdlib::Port $scrape_port = 9256,
Expand Down
2 changes: 1 addition & 1 deletion manifests/pushgateway.pp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
String $os = $prometheus::os,
String[1] $os = $prometheus::os,
String $extra_options = '',
Optional[String] $download_url = undef,
String[1] $arch = $prometheus::real_arch,
Expand Down
4 changes: 2 additions & 2 deletions manifests/pushprox_client.pp
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
String $os = $prometheus::os,
String[1] $os = $prometheus::os,
String $extra_options = '',
Optional[String] $download_url = undef,
String $config_mode = $prometheus::config_mode,
String $arch = $prometheus::real_arch,
String[1] $arch = $prometheus::real_arch,
Stdlib::Absolutepath $bin_dir = $prometheus::bin_dir,
Hash[String, Scalar] $env_vars = {},
) inherits prometheus {
Expand Down
4 changes: 2 additions & 2 deletions manifests/pushprox_proxy.pp
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
String $os = $prometheus::os,
String[1] $os = $prometheus::os,
String $extra_options = '',
Optional[String] $download_url = undef,
String $config_mode = $prometheus::config_mode,
String $arch = $prometheus::real_arch,
String[1] $arch = $prometheus::real_arch,
Stdlib::Absolutepath $bin_dir = $prometheus::bin_dir,
) inherits prometheus {

Expand Down
4 changes: 2 additions & 2 deletions manifests/rabbitmq_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
String $queues_exclude_regex,
Array[String] $rabbit_capabilities,
Array[String] $rabbit_exporters,
String $arch = $prometheus::real_arch,
String[1] $arch = $prometheus::real_arch,
String $bin_dir = $prometheus::bin_dir,
Optional[String] $download_url = undef,
String $extra_options = '',
Expand All @@ -87,7 +87,7 @@
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
String $os = $prometheus::os,
String[1] $os = downcase($facts['kernel']),
Boolean $purge_config_dir = true,
Boolean $restart_on_change = true,
Boolean $service_enable = true,
Expand Down
4 changes: 2 additions & 2 deletions manifests/redis_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@
Boolean $manage_service = true,
Boolean $manage_user = true,
String $namespace = 'redis',
String $os = $prometheus::os,
String[1] $os = downcase($facts['kernel']),
String $extra_options = '',
Optional[String] $download_url = undef,
String $arch = $prometheus::real_arch,
String[1] $arch = $prometheus::real_arch,
String $bin_dir = $prometheus::bin_dir,
Boolean $export_scrape_job = false,
Stdlib::Port $scrape_port = 9121,
Expand Down
Loading

0 comments on commit ce36000

Please sign in to comment.