]> WPIA git - infra.git/commitdiff
add: infradocs package
authorFelix Dörre <felix@dogcraft.de>
Sun, 21 May 2017 15:16:54 +0000 (11:16 -0400)
committerFelix Dörre <felix@dogcraft.de>
Fri, 9 Jun 2017 17:11:21 +0000 (19:11 +0200)
Change-Id: Ie9da7f3f7e032d53cde7bad92f1a1c1651d15a13

environments/production/manifests/nginx.pp
modules/infradocs/templates/nginx.epp [new file with mode: 0644]

index 4bb0e97dcc0d9b5f7ccff80450217f8980b861eb..3f896c24b8c0b7db29a76aa95be822f4bdbffbdd 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://deb.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,
diff --git a/modules/infradocs/templates/nginx.epp b/modules/infradocs/templates/nginx.epp
new file mode 100644 (file)
index 0000000..0dde01d
--- /dev/null
@@ -0,0 +1,28 @@
+server {
+    listen       0.0.0.0:443 ssl;
+    server_name  infradocs.<%=$systemDomain%>;
+#    ssl_certificate /etc/ssl/private/gigi.crt;
+#    ssl_certificate_key /etc/ssl/private/gigi.key;
+
+#    ssl_client_certificate /etc/ssl/root.crt;
+#    ssl_verify_client on;
+#    ssl_verify_depth 4;
+
+    location / {
+        root '/usr/share/doc/wpia-infradocs/html';
+        index main.html;
+    }
+}
+server {
+    listen       0.0.0.0:80;
+    server_name  infradocs.<%=$systemDomain%>;
+
+    location / {
+        root '/usr/share/doc/wpia-infradocs/html';
+        index main.html;
+    }
+
+    location ~* /.well-known/someca-challenge/.* {
+        root /data/challenge;
+    }
+}