make sure all files exist before making server.pem

This commit is contained in:
Leif Johansson 2018-02-12 00:41:18 +01:00
parent c2d34da3f2
commit b97cfc0f86

View file

@ -164,7 +164,7 @@ class md_publisher(Array $allow_clients = ['any'], String $keyname = undef, Stri
} ->
exec {'server.pem':
cmd => "cat /etc/ssl/private/${_keyname}.key /etc/ssl/certs/${_keyname}.crt > /etc/lighttpd/server.pem",
onlyif => "test ! -f /etc/lighttpd/server.pem"
onlyif => "test ! -f /etc/lighttpd/server.pem -a -f /etc/ssl/private/${_keyname}.key -a -f /etc/ssl/certs/${_keyname}.crt"
} ->
apparmor::profile { 'usr.sbin.lighttpd': source => '/etc/apparmor-cosmos/usr.sbin.lighttpd' } ->
sunet::misc::ufw_allow {'allow-lighttpd':