Skip to content

Commit

Permalink
style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fraenki committed Nov 1, 2018
1 parent c5491f4 commit 9f330f6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
15 changes: 8 additions & 7 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@
class galera(
# parameters that need to be evaluated early
Enum['codership', 'mariadb', 'osp5', 'percona'] $vendor_type,
Optional[String] $vendor_version = undef,
# required parameters
String $bind_address,
Optional[String] $bootstrap_command = undef,
Optional[String] $client_package_name = undef,
Boolean $configure_firewall,
Boolean $configure_repo,
Boolean $create_root_my_cnf,
Expand All @@ -18,16 +15,13 @@
Hash $default_options,
String $galera_master,
String $galera_package_ensure,
Optional[String] $galera_package_name = undef,
String $grep_binary,
Optional[String] $libgalera_location = undef,
String $local_ip,
Boolean $manage_additional_packages,
Boolean $manage_package_nmap,
String $mysql_binary,
Integer $mysql_port,
Boolean $mysql_restart,
Optional[String] $mysql_service_name = undef,
Hash $override_options,
String $package_ensure,
Boolean $purge_conf_dir,
Expand All @@ -50,12 +44,19 @@
Enum['mysqldump', 'rsync', 'skip', 'xtrabackup'] $wsrep_sst_method,
Integer $wsrep_state_transfer_port,
# optional parameters
# (some of them are actually required, see notes)
Optional[Array] $additional_packages = undef,
Optional[String] $bootstrap_command = undef,
Optional[String] $client_package_name = undef,
Optional[String] $create_root_user = undef,
Optional[String] $mysql_package_name = undef,
Optional[String] $galera_package_name = undef,
Optional[Array] $galera_servers = undef,
Optional[String] $libgalera_location = undef,
Optional[String] $mysql_package_name = undef,
Optional[String] $mysql_service_name = undef,
Optional[String] $status_log_on_failure = undef,
Optional[String] $status_log_on_success = undef,
Optional[String] $vendor_version = undef,
) {
# Fetch appropiate default values from module data, depending on the values
# of $vendor_type and $vendor_version.
Expand Down
27 changes: 14 additions & 13 deletions manifests/repo.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
# can be installed
#
class galera::repo(
# parameters that need to be evaluated early
# required parameters
String $vendor_type = $galera::vendor_type,
Boolean $epel_needed,
# optional parameters
Optional[String] $vendor_version = undef,
Optional[Array] $additional_packages = undef,
# APT
Expand All @@ -16,7 +18,6 @@
Optional[String] $apt_release = undef,
Optional[String] $apt_repos = undef,
# YUM
Boolean $epel_needed,
Optional[String] $yum_baseurl = undef,
Optional[String] $yum_descr = undef,
Optional[Integer] $yum_enabled = undef,
Expand All @@ -38,17 +39,17 @@
# The following compatibility layer (part 2) is only required for parameters
# that may vary depending on the values of $vendor_version and $vendor_type.
$params = {
apt_include_src => $apt_include_src,
apt_key => $apt_key,
apt_key_server => $apt_key_server,
apt_location => $apt_location,
apt_release => $apt_release,
apt_repos => $apt_repos,
yum_baseurl => $yum_baseurl,
yum_descr => $yum_descr,
yum_enabled => $yum_enabled,
yum_gpgcheck => $yum_gpgcheck,
yum_gpgkey => $yum_gpgkey,
apt_include_src => $apt_include_src,
apt_key => $apt_key,
apt_key_server => $apt_key_server,
apt_location => $apt_location,
apt_release => $apt_release,
apt_repos => $apt_repos,
yum_baseurl => $yum_baseurl,
yum_descr => $yum_descr,
yum_enabled => $yum_enabled,
yum_gpgcheck => $yum_gpgcheck,
yum_gpgkey => $yum_gpgkey,
}.reduce({}) |$memo, $x| {
# If a value was specified as class parameter, then use it. Otherwise use
# lookup() to find a value in Hiera (or to fallback to default values from
Expand Down

0 comments on commit 9f330f6

Please sign in to comment.