Skip to content

Commit

Permalink
replace validate_* function calls with param Types
Browse files Browse the repository at this point in the history
  • Loading branch information
bramblek1 committed Oct 19, 2017
1 parent cd00802 commit 35177fd
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions manifests/blackbox_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
# prober: tcp
# preferred_ip_protocol: ip4
class prometheus::blackbox_exporter (
$modules = {},
Hash $modules = {},
$arch = $::prometheus::params::arch,
$bin_dir = $::prometheus::params::bin_dir,
$config_file = $::prometheus::params::blackbox_exporter_config_file,
Expand All @@ -102,14 +102,14 @@
$group = $::prometheus::params::blackbox_exporter_group,
$init_style = $::prometheus::params::init_style,
$install_method = $::prometheus::params::install_method,
$manage_group = true,
$manage_service = true,
$manage_user = true,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
$os = $::prometheus::params::os,
$package_ensure = $::prometheus::params::blackbox_exporter_package_ensure,
$package_name = $::prometheus::params::blackbox_exporter_package_name,
$restart_on_change = true,
$service_enable = true,
Boolean $restart_on_change = true,
Boolean $service_enable = true,
$service_ensure = 'running',
$service_name = 'blackbox_exporter',
$user = $::prometheus::params::blackbox_exporter_user,
Expand All @@ -123,10 +123,6 @@
$release = $version
}
$real_download_url = pick($download_url,"${download_url_base}/download/${release}/${package_name}-${version}.${os}-${arch}.${download_extension}")
validate_hash($modules)
validate_bool($manage_user)
validate_bool($manage_service)
validate_bool($restart_on_change)
$notify_service = $restart_on_change ? {
true => Service[$service_name],
default => undef,
Expand Down

0 comments on commit 35177fd

Please sign in to comment.