Skip to content

Commit

Permalink
Merge pull request #103 from TheMeier/variant_undef
Browse files Browse the repository at this point in the history
replace all Variant[Undef.. with Optional[...
  • Loading branch information
wyardley authored Nov 7, 2017
2 parents a2bb6c1 + 52491e6 commit 3e3a80f
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 93 deletions.
48 changes: 24 additions & 24 deletions manifests/blackbox_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -90,30 +90,30 @@
# preferred_ip_protocol: ip4
class prometheus::blackbox_exporter (
Hash $modules = {},
String $arch = $::prometheus::params::arch,
String $bin_dir = $::prometheus::params::bin_dir,
String $config_file = $::prometheus::params::blackbox_exporter_config_file,
String $config_mode = $::prometheus::params::config_mode,
String $download_extension = $::prometheus::params::blackbox_exporter_download_extension,
Variant[Undef,String] $download_url = undef,
String $download_url_base = $::prometheus::params::blackbox_exporter_download_url_base,
Array[String] $extra_groups = $::prometheus::params::blackbox_exporter_extra_groups,
String $extra_options = '',
String $group = $::prometheus::params::blackbox_exporter_group,
String $init_style = $::prometheus::params::init_style,
String $install_method = $::prometheus::params::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
String $os = $::prometheus::params::os,
String $package_ensure = $::prometheus::params::blackbox_exporter_package_ensure,
String $package_name = $::prometheus::params::blackbox_exporter_package_name,
Boolean $restart_on_change = true,
Boolean $service_enable = true,
String $service_ensure = 'running',
String $service_name = 'blackbox_exporter',
String $user = $::prometheus::params::blackbox_exporter_user,
String $version = $::prometheus::params::blackbox_exporter_version,
String $arch = $::prometheus::params::arch,
String $bin_dir = $::prometheus::params::bin_dir,
String $config_file = $::prometheus::params::blackbox_exporter_config_file,
String $config_mode = $::prometheus::params::config_mode,
String $download_extension = $::prometheus::params::blackbox_exporter_download_extension,
Optional[String] $download_url = undef,
String $download_url_base = $::prometheus::params::blackbox_exporter_download_url_base,
Array[String] $extra_groups = $::prometheus::params::blackbox_exporter_extra_groups,
String $extra_options = '',
String $group = $::prometheus::params::blackbox_exporter_group,
String $init_style = $::prometheus::params::init_style,
String $install_method = $::prometheus::params::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
String $os = $::prometheus::params::os,
String $package_ensure = $::prometheus::params::blackbox_exporter_package_ensure,
String $package_name = $::prometheus::params::blackbox_exporter_package_name,
Boolean $restart_on_change = true,
Boolean $service_enable = true,
String $service_ensure = 'running',
String $service_name = 'blackbox_exporter',
String $user = $::prometheus::params::blackbox_exporter_user,
String $version = $::prometheus::params::blackbox_exporter_version,
) inherits prometheus::params {
# Prometheus added a 'v' on the release name at 0.1.0 of blackbox
if versioncmp ($version, '0.1.0') >= 0 {
Expand Down
48 changes: 24 additions & 24 deletions manifests/elasticsearch_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -78,30 +78,30 @@
# [*version*]
# The binary release version
class prometheus::elasticsearch_exporter (
String $arch = $::prometheus::params::arch,
String $bin_dir = $::prometheus::params::bin_dir,
String $cnf_uri = $::prometheus::params::elasticsearch_exporter_cnf_uri,
String $cnf_timeout = $::prometheus::params::elasticsearch_exporter_cnf_timeout,
String $download_extension = $::prometheus::params::elasticsearch_exporter_download_extension,
Variant[Undef,String] $download_url = undef,
String $download_url_base = $::prometheus::params::elasticsearch_exporter_download_url_base,
Array $extra_groups = $::prometheus::params::elasticsearch_exporter_extra_groups,
String $extra_options = '',
String $group = $::prometheus::params::elasticsearch_exporter_group,
String $init_style = $::prometheus::params::init_style,
String $install_method = $::prometheus::params::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
String $os = $::prometheus::params::os,
String $package_ensure = $::prometheus::params::elasticsearch_exporter_package_ensure,
String $package_name = $::prometheus::params::elasticsearch_exporter_package_name,
Boolean $purge_config_dir = true,
Boolean $restart_on_change = true,
Boolean $service_enable = true,
String $service_ensure = 'running',
String $user = $::prometheus::params::elasticsearch_exporter_user,
String $version = $::prometheus::params::elasticsearch_exporter_version,
String $arch = $::prometheus::params::arch,
String $bin_dir = $::prometheus::params::bin_dir,
String $cnf_uri = $::prometheus::params::elasticsearch_exporter_cnf_uri,
String $cnf_timeout = $::prometheus::params::elasticsearch_exporter_cnf_timeout,
String $download_extension = $::prometheus::params::elasticsearch_exporter_download_extension,
Optional[String] $download_url = undef,
String $download_url_base = $::prometheus::params::elasticsearch_exporter_download_url_base,
Array $extra_groups = $::prometheus::params::elasticsearch_exporter_extra_groups,
String $extra_options = '',
String $group = $::prometheus::params::elasticsearch_exporter_group,
String $init_style = $::prometheus::params::init_style,
String $install_method = $::prometheus::params::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
String $os = $::prometheus::params::os,
String $package_ensure = $::prometheus::params::elasticsearch_exporter_package_ensure,
String $package_name = $::prometheus::params::elasticsearch_exporter_package_name,
Boolean $purge_config_dir = true,
Boolean $restart_on_change = true,
Boolean $service_enable = true,
String $service_ensure = 'running',
String $user = $::prometheus::params::elasticsearch_exporter_user,
String $version = $::prometheus::params::elasticsearch_exporter_version,
) inherits prometheus::params {
#Please provide the download_url for versions < 0.9.0
$real_download_url = pick($download_url,"${download_url_base}/download/v${version}/${package_name}-${version}.${os}-${arch}.${download_extension}")
Expand Down
46 changes: 23 additions & 23 deletions manifests/mongodb_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -72,29 +72,29 @@
# [*version*]
# The binary release version
class prometheus::mongodb_exporter (
String $arch = $::prometheus::params::arch,
String $bin_dir = $::prometheus::params::bin_dir,
String $cnf_uri = $::prometheus::params::mongodb_exporter_cnf_uri,
String $download_extension = $::prometheus::params::mongodb_exporter_download_extension,
Variant[Undef,String] $download_url = undef,
String $download_url_base = $::prometheus::params::mongodb_exporter_download_url_base,
Array $extra_groups = $::prometheus::params::mongodb_exporter_extra_groups,
String $extra_options = '',
String $group = $::prometheus::params::mongodb_exporter_group,
String $init_style = $::prometheus::params::init_style,
String $install_method = $::prometheus::params::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
String $os = $::prometheus::params::os,
String $package_ensure = $::prometheus::params::mongodb_exporter_package_ensure,
String $package_name = $::prometheus::params::mongodb_exporter_package_name,
Boolean $purge_config_dir = true,
Boolean $restart_on_change = true,
Boolean $service_enable = true,
String $service_ensure = 'running',
String $user = $::prometheus::params::mongodb_exporter_user,
String $version = $::prometheus::params::mongodb_exporter_version,
String $arch = $::prometheus::params::arch,
String $bin_dir = $::prometheus::params::bin_dir,
String $cnf_uri = $::prometheus::params::mongodb_exporter_cnf_uri,
String $download_extension = $::prometheus::params::mongodb_exporter_download_extension,
Optional[String] $download_url = undef,
String $download_url_base = $::prometheus::params::mongodb_exporter_download_url_base,
Array $extra_groups = $::prometheus::params::mongodb_exporter_extra_groups,
String $extra_options = '',
String $group = $::prometheus::params::mongodb_exporter_group,
String $init_style = $::prometheus::params::init_style,
String $install_method = $::prometheus::params::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
String $os = $::prometheus::params::os,
String $package_ensure = $::prometheus::params::mongodb_exporter_package_ensure,
String $package_name = $::prometheus::params::mongodb_exporter_package_name,
Boolean $purge_config_dir = true,
Boolean $restart_on_change = true,
Boolean $service_enable = true,
String $service_ensure = 'running',
String $user = $::prometheus::params::mongodb_exporter_user,
String $version = $::prometheus::params::mongodb_exporter_version,
) inherits prometheus::params {
#Please provide the download_url for versions < 0.9.0
$real_download_url = pick($download_url,"${download_url_base}/download/v${version}/${package_name}-${version}.${os}-${arch}.${download_extension}")
Expand Down
44 changes: 22 additions & 22 deletions manifests/pushgateway.pp
Original file line number Diff line number Diff line change
Expand Up @@ -69,28 +69,28 @@
# [*version*]
# The binary release version
class prometheus::pushgateway (
String $arch = $::prometheus::params::arch,
String $bin_dir = $::prometheus::params::bin_dir,
String $download_extension = $::prometheus::params::pushgateway_download_extension,
Variant[Undef,String] $download_url = undef,
String $download_url_base = $::prometheus::params::pushgateway_download_url_base,
Array $extra_groups = $::prometheus::params::pushgateway_extra_groups,
String $extra_options = '',
String $group = $::prometheus::params::pushgateway_group,
String $init_style = $::prometheus::params::init_style,
String $install_method = $::prometheus::params::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
String $os = $::prometheus::params::os,
String $package_ensure = $::prometheus::params::pushgateway_package_ensure,
String $package_name = $::prometheus::params::pushgateway_package_name,
Boolean $restart_on_change = true,
Boolean $service_enable = true,
String $service_ensure = 'running',
String $service_name = 'pushgateway',
String $user = $::prometheus::params::pushgateway_user,
String $version = $::prometheus::params::pushgateway_version,
String $arch = $::prometheus::params::arch,
String $bin_dir = $::prometheus::params::bin_dir,
String $download_extension = $::prometheus::params::pushgateway_download_extension,
Optional[String] $download_url = undef,
String $download_url_base = $::prometheus::params::pushgateway_download_url_base,
Array $extra_groups = $::prometheus::params::pushgateway_extra_groups,
String $extra_options = '',
String $group = $::prometheus::params::pushgateway_group,
String $init_style = $::prometheus::params::init_style,
String $install_method = $::prometheus::params::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
String $os = $::prometheus::params::os,
String $package_ensure = $::prometheus::params::pushgateway_package_ensure,
String $package_name = $::prometheus::params::pushgateway_package_name,
Boolean $restart_on_change = true,
Boolean $service_enable = true,
String $service_ensure = 'running',
String $service_name = 'pushgateway',
String $user = $::prometheus::params::pushgateway_user,
String $version = $::prometheus::params::pushgateway_version,
) inherits prometheus::params {
# Prometheus added a 'v' on the realease name at 0.3.0
if versioncmp ($version, '0.3.0') >= 0 {
Expand Down

0 comments on commit 3e3a80f

Please sign in to comment.