make service dependent on ssl and apparmor

This commit is contained in:
Leif Johansson 2018-02-12 00:48:19 +01:00
parent 3cb9e38d5c
commit 42148f16b3

View file

@ -157,7 +157,6 @@ class md_publisher(Array $allow_clients = ['any'], $keyname = undef, String $dir
ssh_key_type => safe_hiera('publisher_ssh_key_type',"HOT SET IN HIERA")
} ->
package {'lighttpd': ensure => latest } ->
service {'lighttpd': ensure => running } ->
exec {'enable-ssl':
command => "/usr/sbin/lighttpd-enable-mod ssl",
onlyif => "test ! -h /etc/lighttpd/conf-enabled/*ssl*"
@ -167,6 +166,7 @@ class md_publisher(Array $allow_clients = ['any'], $keyname = undef, String $dir
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' } ->
service {'lighttpd': ensure => running } ->
sunet::misc::ufw_allow {'allow-lighttpd':
from => $allow_clients,
port => 443