Skip to content

Commit cc37d27

Browse files
committed
make picking haproxy::globals::sort_options_alphabetic work
all the pick statements for the sort_options_alphabetic are useless, if the value is not optional !
1 parent 00d43f4 commit cc37d27

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

manifests/backend.pp

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
#
4545
# @param sort_options_alphabetic
4646
# Sort options either alphabetic or custom like haproxy internal sorts them.
47-
# Defaults to true.
47+
# Defaults to undef (picking true from $haproxy::globals::sort_options_alphabetic).
4848
#
4949
# @param defaults
5050
# Name of the defaults section this backend will use.
@@ -77,7 +77,7 @@
7777
},
7878
String $instance = 'haproxy',
7979
String[1] $section_name = $name,
80-
Boolean $sort_options_alphabetic = true,
80+
Optional[Boolean] $sort_options_alphabetic = undef,
8181
Optional[String] $description = undef,
8282
Optional[String] $defaults = undef,
8383
Optional[Stdlib::Absolutepath] $config_file = undef,

manifests/defaults.pp

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#
1515
# @param sort_options_alphabetic
1616
# Sort options either alphabetic or custom like haproxy internal sorts them.
17-
# Defaults to true.
17+
# Defaults to undef (picking true from $haproxy::globals::sort_options_alphabetic).
1818
#
1919
# @param merge_options
2020
# Whether to merge the user-supplied `options` hash with the
@@ -25,10 +25,10 @@
2525
# Optional. Defaults to 'haproxy'.
2626
#
2727
define haproxy::defaults (
28-
Hash $options = {},
29-
Boolean $sort_options_alphabetic = true,
30-
Boolean $merge_options = $haproxy::params::merge_options,
31-
String $instance = 'haproxy',
28+
Hash $options = {},
29+
Optional[Boolean] $sort_options_alphabetic = undef,
30+
Boolean $merge_options = $haproxy::params::merge_options,
31+
String $instance = 'haproxy',
3232
) {
3333
if $instance == 'haproxy' {
3434
include haproxy

manifests/frontend.pp

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
#
4646
# @param sort_options_alphabetic
4747
# Sort options either alphabetic or custom like haproxy internal sorts them.
48-
# Defaults to true.
48+
# Defaults to undef (picking true from $haproxy::globals::sort_options_alphabetic).
4949
#
5050
# @param defaults
5151
# Name of the defaults section this backend will use.
@@ -103,7 +103,7 @@
103103
},
104104
String $instance = 'haproxy',
105105
String[1] $section_name = $name,
106-
Boolean $sort_options_alphabetic = true,
106+
Optional[Boolean] $sort_options_alphabetic = undef,
107107
Optional[String] $description = undef,
108108
Optional[String] $defaults = undef,
109109
Boolean $defaults_use_backend = true,

manifests/listen.pp

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
#
6262
# @param sort_options_alphabetic
6363
# Sort options either alphabetic or custom like haproxy internal sorts them.
64-
# Defaults to true.
64+
# Defaults to undef (picking true from $haproxy::globals::sort_options_alphabetic).
6565
#
6666
# @param defaults
6767
# Name of the defaults section this backend will use.
@@ -107,7 +107,7 @@
107107
},
108108
String $instance = 'haproxy',
109109
String[1] $section_name = $name,
110-
Boolean $sort_options_alphabetic = true,
110+
Optional[Boolean] $sort_options_alphabetic = undef,
111111
Optional[String] $description = undef,
112112
Optional[String] $defaults = undef,
113113
Optional[Stdlib::Absolutepath] $config_file = undef,

manifests/resolver.pp

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
#
6363
# @param sort_options_alphabetic
6464
# Sort options either alphabetic or custom like haproxy internal sorts them.
65-
# Defaults to true.
65+
# Defaults to undef (picking true from $haproxy::globals::sort_options_alphabetic).
6666
#
6767
# @param defaults
6868
# Name of the defaults section this backend will use.
@@ -105,7 +105,7 @@
105105
Optional[Integer[512, 8192]] $accepted_payload_size = undef,
106106
String $instance = 'haproxy',
107107
String[1] $section_name = $name,
108-
Boolean $sort_options_alphabetic = true,
108+
Optional[Boolean] $sort_options_alphabetic = undef,
109109
Boolean $collect_exported = true,
110110
Optional[Stdlib::Absolutepath] $config_file = undef,
111111
Optional[String] $defaults = undef,

0 commit comments

Comments
 (0)