From 35177fda0e9765020a1623a0acf6a321dcdc0670 Mon Sep 17 00:00:00 2001 From: Andrew Bramble Date: Thu, 19 Oct 2017 11:21:08 +1100 Subject: [PATCH] replace validate_* function calls with param Types --- manifests/blackbox_exporter.pp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/manifests/blackbox_exporter.pp b/manifests/blackbox_exporter.pp index fa364d23f..32aeb3a54 100644 --- a/manifests/blackbox_exporter.pp +++ b/manifests/blackbox_exporter.pp @@ -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, @@ -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, @@ -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,