Skip to content

Commit

Permalink
Merge pull request #179 from GutierrezJeremy/release_3.0.2
Browse files Browse the repository at this point in the history
Fix Puppet lint offenses and replace legacy fact with modern fact
  • Loading branch information
fraenki authored Jan 23, 2023
2 parents 6726958 + b319c97 commit 60828bf
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## Unreleased

### Fixed
* Fix Puppet lint offenses

## [3.0.1]

### Added
Expand Down
12 changes: 6 additions & 6 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@
libgalera_location => $libgalera_location,
mysql_package_name => $mysql_package_name,
mysql_service_name => $mysql_service_name,
}.reduce( {}) |$memo, $x| {
}.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
# module data).
Expand All @@ -379,7 +379,7 @@
$optional_params = {
config_file => undef,
includedir => undef,
}.reduce( {}) |$memo, $x| {
}.reduce({}) |$memo, $x| {
$_v = lookup("${module_name}::${vendor_type}::${vendor_version_internal}::${$x[0]}", { default_value => undef }) ? {
undef => lookup("${module_name}::${vendor_type}::${$x[0]}", { default_value => undef }),
default => lookup("${module_name}::${vendor_type}::${vendor_version_internal}::${$x[0]}"),
Expand Down Expand Up @@ -409,10 +409,10 @@
# to the inline_epp() function. This way it is possible to use the values of
# module parameters in MySQL/MariaDB options by specifying them in epp syntax.
$wsrep_sst_auth_real = inline_epp($wsrep_sst_auth)
$_default_options = $_default_tmp.reduce( {}) |$memo, $x| {
$_default_options = $_default_tmp.reduce({}) |$memo, $x| {
# A nested hash contains the configuration options.
if ($x[1] =~ Hash) {
$_values = $x[1].reduce( {}) |$m,$y| {
$_values = $x[1].reduce({}) |$m,$y| {
# epp expects a string, so skip all other types.
if ($y[1] =~ String) {
$_v = inline_epp($y[1])
Expand All @@ -426,10 +426,10 @@
}
$memo + { $x[0] => $_values }
}
$_override_options = $override_options.reduce( {}) |$memo, $x| {
$_override_options = $override_options.reduce({}) |$memo, $x| {
# A nested hash contains the configuration options.
if ($x[1] =~ Hash) {
$_values = $x[1].reduce( {}) |$m,$y| {
$_values = $x[1].reduce({}) |$m,$y| {
# epp expects a string, so skip all other types.
if ($y[1] =~ String) {
$_v = inline_epp($y[1])
Expand Down
2 changes: 1 addition & 1 deletion manifests/repo/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
# galera::repo::REPONAME::TYPE:
# location: 'http://repo.example.com/mysql-wsrep-<%= $vendor_version_real %>'
#
$config = $_config_tmp.reduce( {}) |$memo, $x| {
$config = $_config_tmp.reduce({}) |$memo, $x| {
# epp expects a string, so skip all other types.
if ($x[1] =~ String) {
$_values = inline_epp($x[1])
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/galera_mariadb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class { 'galera':
deb_sysmaint_password => 'sysmaint',
configure_firewall => false,
galera_servers => ['127.0.0.1'],
galera_master => $::fqdn,
galera_master => $facts['networking']['fqdn'],
root_password => 'root_password',
status_password => 'status_password',
override_options => {
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/galera_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class { 'galera':
configure_firewall => false,
deb_sysmaint_password => 'sysmaint',
galera_servers => ['127.0.0.1'],
galera_master => $::fqdn,
galera_master => $facts['networking']['fqdn'],
root_password => 'root_password',
status_password => 'status_password',
override_options => {
Expand Down

0 comments on commit 60828bf

Please sign in to comment.