Skip to content
This repository was archived by the owner on Mar 28, 2019. It is now read-only.

Commit 51daf35

Browse files
committed
proper removal of the arrays in server config
1 parent 680a99e commit 51daf35

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

manifests/server.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
$bindaddress = '0.0.0.0',
136136
$ca = false,
137137
$config_version = '/usr/bin/git --git-dir $confdir/environments/$environment/.git rev-parse --short HEAD 2>/dev/null || echo',
138-
$dns_alt_names = undef,
138+
$dns_alt_names = [],
139139
$enc = '',
140140
$enc_exec = '',
141141
$ensure = 'present',

manifests/server/config.pp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
$environmentpath_ensure = 'absent'
1919
}
2020

21-
if $puppet::server::basemodulepath {
21+
if ! empty($puppet::server::basemodulepath) {
2222
$basemodulepath_ensure = 'present'
2323
} else {
2424
$basemodulepath_ensure = 'absent'
@@ -41,7 +41,7 @@
4141
$manifest_ensure = 'absent'
4242
}
4343

44-
if $puppet::server::modulepath {
44+
if ! empty($puppet::server::modulepath) {
4545
$modulepath_ensure = 'present'
4646
} else {
4747
$modulepath_ensure = 'absent'
@@ -146,7 +146,7 @@
146146
value => $puppet::server::ssl_client_verify_header,
147147
}
148148

149-
if $puppet::server::reports {
149+
if ! empty($puppet::server::reports) {
150150
$reports_ensure = 'present'
151151
} else {
152152
$reports_ensure = 'absent'
@@ -212,7 +212,7 @@
212212
value => $puppet::server::parser,
213213
}
214214

215-
if $puppet::server::dns_alt_names {
215+
if ! empty($puppet::server::dns_alt_names) {
216216
$dns_alt_names_ensure = 'present'
217217
} else {
218218
$dns_alt_names_ensure = 'absent'
@@ -221,7 +221,7 @@
221221
ini_setting { 'dns_alt_names':
222222
ensure => $dns_alt_names_ensure,
223223
setting => 'dns_alt_names',
224-
value => $puppet::server::dns_alt_names,
224+
value => join(flatten([ $puppet::server::dns_alt_names ]), ', ')
225225
}
226226

227227
if $puppet::server::autosign {

0 commit comments

Comments
 (0)