summaryrefslogtreecommitdiff
path: root/files/puppet/modules/pixelated/templates
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2016-09-06 13:59:05 +0200
committervarac <varacanero@zeromail.org>2016-09-06 13:59:05 +0200
commit5fbd43d5a948ac7773955a26c1d0cb0db42252d9 (patch)
treed1f9b2d6b2ad015fec1f53256887b39838748d5f /files/puppet/modules/pixelated/templates
parentcb6740619fe003b4a1956a413844a1a2bfa4b9de (diff)
git subrepo clone https://github.com/pixelated/puppet-pixelated.git files/puppet/modules/pixelated
subrepo: subdir: "files/puppet/modules/pixelated" merged: "6086b94" upstream: origin: "https://github.com/pixelated/puppet-pixelated.git" branch: "master" commit: "6086b94" git-subrepo: version: "0.3.0" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "1e79595"
Diffstat (limited to 'files/puppet/modules/pixelated/templates')
-rw-r--r--files/puppet/modules/pixelated/templates/05-pixelated.conf.erb7
-rw-r--r--files/puppet/modules/pixelated/templates/pixelated-apache.conf.erb60
-rw-r--r--files/puppet/modules/pixelated/templates/pixelated-server-default9
-rw-r--r--files/puppet/modules/pixelated/templates/webapp/show.html.haml.erb6
4 files changed, 82 insertions, 0 deletions
diff --git a/files/puppet/modules/pixelated/templates/05-pixelated.conf.erb b/files/puppet/modules/pixelated/templates/05-pixelated.conf.erb
new file mode 100644
index 0000000..35f1353
--- /dev/null
+++ b/files/puppet/modules/pixelated/templates/05-pixelated.conf.erb
@@ -0,0 +1,7 @@
+# This file is managed by Puppet, changes may be overwritten
+if $syslogtag contains_i 'user-agent' then {
+ action(type="omfile" file="/var/log/pixelated/user-agent.log")
+ stop
+}
+
+
diff --git a/files/puppet/modules/pixelated/templates/pixelated-apache.conf.erb b/files/puppet/modules/pixelated/templates/pixelated-apache.conf.erb
new file mode 100644
index 0000000..9f71420
--- /dev/null
+++ b/files/puppet/modules/pixelated/templates/pixelated-apache.conf.erb
@@ -0,0 +1,60 @@
+<VirtualHost *:80>
+ ServerName mail.<%= scope.lookupvar('::pixelated::agent::domain') %>
+ RewriteEngine On
+ RewriteRule ^.*$ https://mail.<%= scope.lookupvar('::pixelated::agent::domain') %>%{REQUEST_URI} [R=permanent,L]
+ CustomLog ${APACHE_LOG_DIR}/mail.<%= scope.lookupvar('::pixelated::agent::domain') %>.log common
+</VirtualHost>
+
+<VirtualHost *:443>
+ ServerName mail.<%= scope.lookupvar('::pixelated::agent::domain') %>
+ CustomLog ${APACHE_LOG_DIR}/mail.<%= scope.lookupvar('::pixelated::agent::domain') %>.log common
+
+ SSLCACertificatePath /etc/ssl/certs
+ SSLCertificateChainFile /usr/local/share/ca-certificates/leap_commercial_ca.crt
+ SSLCertificateKeyFile /etc/x509/keys/leap_commercial.key
+ SSLCertificateFile /etc/x509/certs/leap_commercial.crt
+
+ Include include.d/ssl_common.inc
+
+ <IfModule mod_headers.c>
+ Header always unset X-Powered-By
+ Header always unset X-Runtime
+ Header set X-Frame-Options SAMEORIGIN
+ </IfModule>
+
+ DocumentRoot /srv/leap/webapp/public
+
+ SSLProxyEngine on
+ ProxyPass / https://<%= scope.lookupvar('::pixelated::agent::domain') %>:8080/
+ ProxyPassReverse / https://<%= scope.lookupvar('::pixelated::agent::domain') %>:8080/
+</VirtualHost>
+
+
+Listen 8083
+<VirtualHost *:8083>
+ ServerName mail.<%= scope.lookupvar('::pixelated::agent::domain') %>
+ CustomLog ${APACHE_LOG_DIR}/mail.<%= scope.lookupvar('::pixelated::agent::domain') %>.log common
+
+ SSLCACertificatePath /etc/ssl/certs
+ SSLCertificateChainFile /usr/local/share/ca-certificates/leap_commercial_ca.crt
+ SSLCertificateKeyFile /etc/x509/keys/leap_commercial.key
+ SSLCertificateFile /etc/x509/certs/leap_commercial.crt
+
+ Include include.d/ssl_common.inc
+
+ <IfModule mod_headers.c>
+ Header always unset X-Powered-By
+ Header always unset X-Runtime
+ </IfModule>
+
+ DocumentRoot /srv/leap/webapp/public
+
+ SSLProxyEngine on
+ ProxyPass / https://<%= scope.lookupvar('::pixelated::agent::domain') %>:8080/
+ ProxyPassReverse / https://<%= scope.lookupvar('::pixelated::agent::domain') %>:8080/
+ Header unset Content-Security-Policy
+ Header unset X-Content-Security-Policy
+ Header unset X-Webkit-Csp
+
+</VirtualHost>
+
diff --git a/files/puppet/modules/pixelated/templates/pixelated-server-default b/files/puppet/modules/pixelated/templates/pixelated-server-default
new file mode 100644
index 0000000..efe91dd
--- /dev/null
+++ b/files/puppet/modules/pixelated/templates/pixelated-server-default
@@ -0,0 +1,9 @@
+# managed by puppet
+
+FEEDBACK_URL=
+HOME=/var/lib/pixelated
+LEAP_PROVIDER=<%= @domain %>
+SSL_KEY=/etc/x509/keys/leap_commercial.key
+SSL_CERT=/etc/x509/certs/leap_commercial.crt
+LEAP_CA=/etc/ssl/certs/ca-certificates.crt
+EXTRA_OPTS="--banner /etc/pixelated/pixelated_banner.html"
diff --git a/files/puppet/modules/pixelated/templates/webapp/show.html.haml.erb b/files/puppet/modules/pixelated/templates/webapp/show.html.haml.erb
new file mode 100644
index 0000000..0ede372
--- /dev/null
+++ b/files/puppet/modules/pixelated/templates/webapp/show.html.haml.erb
@@ -0,0 +1,6 @@
+= render 'overview'
+.container-fluid
+ .row-fluid
+ %br
+ %h4
+ = link_to 'Go to your Pixelated inbox', 'https://mail.<%= scope.lookupvar('::pixelated::agent::domain') %>'