+
+define motion::frontend($domain, $container, $roots = 'puppet:///modules/motion/motion-roots.pem'){
+ @file{"/etc/ssl/${name}-roots.pem":
+ ensure => 'file',
+ source => [$roots, 'puppet:///modules/nre/config/ca/root.crt'],
+ tag => [nginx]
+ }
+ @front_vhost{"${container}-${domain}":
+ source => 'motion/nginx.epp',
+ args => {container => $container, name => $name, cert_stem => "/etc/ssl/private/${container}", domain => $domain, socket => "unix:/${container}-socket/motion.fcgi"},
+ crt => "motion/${container}",
+ tag => [nginx]
+ }
+}