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