]> WPIA git - infra.git/blobdiff - environments/production/manifests/nginx.pp
add: virtual resource collectors for nginx+pg
[infra.git] / environments / production / manifests / nginx.pp
index 373e2a84c2c84b6bbc2176f701ba254ddb952c5c..9b9c5613cf509479a3f63be3c4ff2300a6cd243d 100644 (file)
@@ -30,6 +30,15 @@ define front_vhost($source, $crt = undefined){
 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'
   }
@@ -43,6 +52,13 @@ node front-nginx {
     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,
@@ -63,7 +79,8 @@ node front-nginx {
     notify => Service['nginx']
   }
   service {'nginx':
-    ensure => 'running'
+    ensure => 'running',
+    enable => true,
   }
   #for gitweb hosting
   package{'git':
@@ -74,4 +91,7 @@ node front-nginx {
     notify => Service['nginx'],
     crt => 'gitweb/web'
   }
+
+  Front_vhost <| tag == nginx |> ~> Service['nginx']
+  File <| tag == nginx |> ~> Service['nginx']
 }