diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2018-02-24 10:38:28 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2018-02-24 10:38:28 +0100 |
commit | fb6825f869e7895940a3df2f15da6cdac32a1e0b (patch) | |
tree | 3310caa87b3edc745a6cfa4baa561d2b4404af66 /ansible | |
parent | 6a8cf1a8888d570e33abb08e745d8f5689b0e64e (diff) | |
download | infra-fb6825f869e7895940a3df2f15da6cdac32a1e0b.tar.gz infra-fb6825f869e7895940a3df2f15da6cdac32a1e0b.tar.bz2 infra-fb6825f869e7895940a3df2f15da6cdac32a1e0b.tar.xz infra-fb6825f869e7895940a3df2f15da6cdac32a1e0b.zip |
wip
Diffstat (limited to 'ansible')
-rw-r--r-- | ansible/hosts | 1 | ||||
-rw-r--r-- | ansible/mw.yml | 6 | ||||
-rw-r--r-- | ansible/roles/mw-frontend/files/etc/apache2/sites-available/mw.trygvis.io-ssl.conf | 29 | ||||
-rw-r--r-- | ansible/roles/mw-frontend/tasks/main.yml | 5 |
4 files changed, 38 insertions, 3 deletions
diff --git a/ansible/hosts b/ansible/hosts index 8ba6e80..c30ec8a 100644 --- a/ansible/hosts +++ b/ansible/hosts @@ -1 +1,2 @@ knot.trygvis.io +mw.trygvis.io diff --git a/ansible/mw.yml b/ansible/mw.yml new file mode 100644 index 0000000..d65245d --- /dev/null +++ b/ansible/mw.yml @@ -0,0 +1,6 @@ +--- +- hosts: + - mw.trygvis.io + roles: + - mw-backend + diff --git a/ansible/roles/mw-frontend/files/etc/apache2/sites-available/mw.trygvis.io-ssl.conf b/ansible/roles/mw-frontend/files/etc/apache2/sites-available/mw.trygvis.io-ssl.conf new file mode 100644 index 0000000..6260e2e --- /dev/null +++ b/ansible/roles/mw-frontend/files/etc/apache2/sites-available/mw.trygvis.io-ssl.conf @@ -0,0 +1,29 @@ +<IfModule mod_ssl.c> +<VirtualHost *:443> + ServerAdmin root@trygvis.io + ServerName mw.trygvis.io + + LogLevel warn + ErrorLog ${APACHE_LOG_DIR}/mw.trygvis.io-error.log + CustomLog ${APACHE_LOG_DIR}/mw.trygvis.io-access.log combined + + DocumentRoot /var/www/mw.trygvis.io/htdocs + <Directory /> + Options FollowSymLinks + AllowOverride None + </Directory> + <Directory /var/www/mw.trygvis.io/htdocs/> + Options Indexes FollowSymLinks MultiViews + AllowOverride None + Order allow,deny + allow from all + </Directory> + + ProxyPreserveHost On + ProxyPass / http://conflatorio.vpn.trygvis.io:8080/ + + SSLCertificateFile /etc/letsencrypt/live/mw.trygvis.io/fullchain.pem + SSLCertificateKeyFile /etc/letsencrypt/live/mw.trygvis.io/privkey.pem + Include /etc/letsencrypt/options-ssl-apache.conf +</VirtualHost> +</IfModule> diff --git a/ansible/roles/mw-frontend/tasks/main.yml b/ansible/roles/mw-frontend/tasks/main.yml index 9c667d1..b7bb13f 100644 --- a/ansible/roles/mw-frontend/tasks/main.yml +++ b/ansible/roles/mw-frontend/tasks/main.yml @@ -1,6 +1,5 @@ --- - name: apache config copy: - dest: /etc/apache/sites-enabled/mw.trygvis.io.conf - content: | - woop! + src: etc/apache2/sites-available/mw.trygvis.io-ssl.conf + dest: /etc/apache2/sites-available/mw.trygvis.io-ssl.conf |