Skip to content

Commit 298fe19

Browse files
committed
Use fact() to deal with missing domain
The fact function returns undef if the fact doesn't exist. This simplifies the code.
1 parent 01fd3cc commit 298fe19

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

manifests/params.pp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,7 @@
3333
$server_compile_mode = undef
3434
$dns_alt_names = []
3535
$use_srv_records = false
36-
37-
if defined('$::domain') {
38-
$srv_domain = $facts['networking']['domain']
39-
} else {
40-
$srv_domain = undef
41-
}
36+
$srv_domain = fact('networking.domain')
4237

4338
# lint:ignore:puppet_url_without_modules
4439
$pluginsource = 'puppet:///plugins'

0 commit comments

Comments
 (0)