From c41a0e455d1fa5994a8bf8cbd9049ceab24a1eea Mon Sep 17 00:00:00 2001 From: =?utf8?q?Felix=20D=C3=B6rre?= Date: Sun, 21 May 2017 11:16:54 -0400 Subject: [PATCH] add: infradocs package Change-Id: Ie9da7f3f7e032d53cde7bad92f1a1c1651d15a13 --- environments/production/manifests/nginx.pp | 16 +++++++++++++ modules/infradocs/templates/nginx.epp | 28 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 modules/infradocs/templates/nginx.epp diff --git a/environments/production/manifests/nginx.pp b/environments/production/manifests/nginx.pp index 4bb0e97..3f896c2 100644 --- a/environments/production/manifests/nginx.pp +++ b/environments/production/manifests/nginx.pp @@ -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 index 0000000..0dde01d --- /dev/null +++ b/modules/infradocs/templates/nginx.epp @@ -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; + } +} -- 2.39.2