Commit c5b611a7 authored by Markus Frosch's avatar Markus Frosch 📣
Browse files

apache: Refactor weird if block

parent b640ba7f
Pipeline #182 passed with stage
in 47 seconds
......@@ -7,17 +7,17 @@ class icinga2_testing::profiles::apache (
$default_ssl_vhost = hiera('apache::default_ssl_vhost', false)
if $default_ssl_vhost and hiera('apache::default_ssl_cert', undef) {
$default_ssl_key = undef
$default_ssl_cert = undef
$default_ssl_chain = undef
} elsif $default_ssl_vhost {
if $default_ssl_vhost and ! hiera('apache::default_ssl_cert', undef) {
$default_ssl_key = "${conf_dir}/ssl/key.pem"
$default_ssl_cert = "${conf_dir}/ssl/cert.pem"
$default_ssl_chain = "${conf_dir}/ssl/chain.pem"
$_default_ssl_key = "/var/lib/puppet/ssl/private_keys/${::fqdn}.pem"
$_default_ssl_cert = "/var/lib/puppet/ssl/certs/${::fqdn}.pem"
$_default_ssl_chain = '/var/lib/puppet/ssl/certs/ca.pem'
} else {
$default_ssl_key = undef
$default_ssl_cert = undef
$default_ssl_chain = undef
}
class { '::apache':
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment