Commit 4e15857
committed
Simplify
`postgresql::params` inherits from `postgresql::globals` so any variable
defined in `postgresql::globals` can be accessed by reading it from
`postgresql::params`, making it redundant to check both.
diff --git a/functions/default.pp b/functions/default.pp
index e36610b..41b5006 100644
--- a/functions/default.pp
+++ b/functions/default.pp
@@ -8,8 +8,7 @@ function postgresql::default(
) {
include postgresql::params
- #search for the variable name in params first
- #then fall back to globals if not found
- pick(getvar("postgresql::params::${parameter_name}"),
- getvar("postgresql::globals::${parameter_name}"))
+ # Search for the variable name in params.
+ # params inherits from globals, so it will also catch these variables.
+ pick(getvar("postgresql::params::${parameter_name}"))
}postgresql::default()
1 parent 6cb50cb commit 4e15857
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
14 | 14 | | |
0 commit comments