Skip to content

Commit

Permalink
Fix #106 when using wildcard certificate on multiple vhosts
Browse files Browse the repository at this point in the history
  • Loading branch information
xcompass committed Aug 4, 2013
1 parent d15509e commit 126fb41
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions manifests/resource/vhost.pp
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,17 @@

$cert = regsubst($name,' ','_')

file { "${nginx::params::nx_conf_dir}/${cert}.crt":
# Check if the file has been defined before creating the file to
# avoid the error when using wildcard cert on the multiple vhosts
ensure_resource('file', "${nginx::params::nx_conf_dir}/${cert}.crt", {
ensure => $ensure,
mode => '0644',
source => $ssl_cert,
}
file { "${nginx::params::nx_conf_dir}/${cert}.key":
})
ensure_resource('file', "${nginx::params::nx_conf_dir}/${cert}.key", {
ensure => $ensure,
mode => '0644',
source => $ssl_key,
}
})
}
}

0 comments on commit 126fb41

Please sign in to comment.