Handle undef ca_secrets more gracefully
This commit is contained in:
parent
61a4ec13e3
commit
9379ba58e2
|
@ -35,23 +35,25 @@ class cdn::ca(
|
|||
mode => '0750',
|
||||
}
|
||||
|
||||
if $ca_secrets['key_password'] {
|
||||
file { '/opt/step-ca/init/secrets/key-password':
|
||||
ensure => file,
|
||||
owner => '1000',
|
||||
group => '1000',
|
||||
mode => '0640',
|
||||
content => template('cdn/ca/password.erb'),
|
||||
if $ca_secrets {
|
||||
if $ca_secrets['key_password'] {
|
||||
file { '/opt/step-ca/init/secrets/key-password':
|
||||
ensure => file,
|
||||
owner => '1000',
|
||||
group => '1000',
|
||||
mode => '0640',
|
||||
content => template('cdn/ca/password.erb'),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if $ca_secrets['provisioner_password'] {
|
||||
file { '/opt/step-ca/init/secrets/provisioner-password':
|
||||
ensure => file,
|
||||
owner => '1000',
|
||||
group => '1000',
|
||||
mode => '0640',
|
||||
content => template('cdn/ca/password.erb'),
|
||||
if $ca_secrets['provisioner_password'] {
|
||||
file { '/opt/step-ca/init/secrets/provisioner-password':
|
||||
ensure => file,
|
||||
owner => '1000',
|
||||
group => '1000',
|
||||
mode => '0640',
|
||||
content => template('cdn/ca/password.erb'),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue