-define front_vhost($source, $crt = undefined){
+define front_vhost($source, $crt = undefined, $args = {}){
if $crt {
file{"/etc/ssl/private/$name.crt":
ensure => 'file',
}
file {"/etc/nginx/sites-available/$name.conf":
ensure => 'file',
- content => epp($source),
+ content => epp($source, $args),
require => Package['nginx-light'],
}->
file {"/etc/nginx/sites-enabled/$name.conf":
node front-nginx {
include container::contained;
include container::no_ssh;
+ apt_key{ 'E643C483A426BB5311D26520A631B6AF9FD3DF94':
+ source => 'http://deb2.dogcraft.de/signer.gpg',
+ ensure => 'present'
+ } ->
+ file { '/etc/apt/sources.list.d/dogcraft.list':
+ source => 'puppet:///modules/lxc/dogcraft.list',
+ ensure => 'present',
+ notify => Exec['apt_update']
+ }
package{ 'nginx-light':
ensure => 'installed'
}
source => 'crl/nginx',
notify => Service['nginx']
}
+ package{'wpia-infradocs':
+ ensure => 'installed'
+ } ->
+ front_vhost{'infradocs':
+ source => 'infradocs/nginx',
+ notify => Service['nginx']
+ }
if($protected != 'no') {
file{'/etc/nginx/access.txt':
content => $protected,
notify => Service['nginx']
}
service {'nginx':
- ensure => 'running'
+ ensure => 'running',
+ enable => true,
}
+ #for gitweb hosting
+ package{'git':
+ ensure=>'installed'
+ }
+ front_vhost{'gitweb':
+ source => 'gitweb/nginx.epp',
+ notify => Service['nginx'],
+ crt => 'gitweb/web'
+ }
+
+ Front_vhost <| tag == nginx |> ~> Service['nginx']
+ File <| tag == nginx |> ~> Service['nginx']
}