Handle undef ca_secrets more gracefully

This commit is contained in:
Patrik Lundin 2024-10-08 09:39:09 +02:00
parent 61a4ec13e3
commit 9379ba58e2
Signed by: patlu
GPG key ID: A0A812BA2249F294

View file

@ -35,6 +35,7 @@ class cdn::ca(
mode => '0750', mode => '0750',
} }
if $ca_secrets {
if $ca_secrets['key_password'] { if $ca_secrets['key_password'] {
file { '/opt/step-ca/init/secrets/key-password': file { '/opt/step-ca/init/secrets/key-password':
ensure => file, ensure => file,
@ -54,6 +55,7 @@ class cdn::ca(
content => template('cdn/ca/password.erb'), content => template('cdn/ca/password.erb'),
} }
} }
}
sunet::nftables::docker_expose { 'expose step-ca' : sunet::nftables::docker_expose { 'expose step-ca' :
allow_clients => 'any', allow_clients => 'any',