Add error-pages role

This commit is contained in:
Alexander Dietrich 2020-04-08 22:49:09 +02:00
parent 61b85e2670
commit 6aa994b056
7 changed files with 48 additions and 16 deletions

View file

@ -5,6 +5,12 @@
- ffhh-basics - ffhh-basics
tags: basics tags: basics
- hosts: nginx
roles:
- nginx
- error-pages
tags: nginx
- hosts: certbot - hosts: certbot
roles: roles:
- certbot - certbot
@ -14,8 +20,3 @@
roles: roles:
- certsync - certsync
tags: certsync tags: certsync
- hosts: nginx
roles:
- nginx
tags: nginx

View file

@ -2,35 +2,26 @@
jitsi ansible_host=jitsi.hamburg.freifunk.net jitsi ansible_host=jitsi.hamburg.freifunk.net
speicher ansible_host=speicher.hamburg.freifunk.net speicher ansible_host=speicher.hamburg.freifunk.net
srv01 ansible_host=srv01.hamburg.freifunk.net srv01 ansible_host=srv01.hamburg.freifunk.net
#srv02 ansible_host=srv02.hamburg.freifunk.net
srv03 ansible_host=srv03.hamburg.freifunk.net srv03 ansible_host=srv03.hamburg.freifunk.net
[certbot] [certbot]
jitsi jitsi
speicher speicher
srv01 srv01
#srv02
[certsync] [certsync]
srv03 srv03
[media]
#srv02
[meta]
#srv02
[nginx] [nginx]
#gw03-new ansible_host=gw03-new.hamburg.freifunk.net
jitsi jitsi
speicher speicher
srv01
srv03
[updates] [updates]
srv01 srv01
srv03 srv03
[vms] [vms]
#gw03-new
srv01 srv01
#srv02
srv03 srv03

View file

@ -0,0 +1,5 @@
error_page 502 /_error-pages/502.html;
location ^~ /_error-pages {
root /var/www;
}

View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Bad Gateway</title>
<link rel="stylesheet" href="/_error-pages/style.css">
</head>
<body>
<img src="/_error-pages/bad_gateway.png" alt="Bad Gateway Traffic Sign">
</body>

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View file

@ -0,0 +1,10 @@
body {
display: flex;
width: 100vw;
height: 100vh;
margin: 0;
padding: 0;
align-items: center;
justify-content: center;
background: white;
}

View file

@ -0,0 +1,15 @@
---
- name: create directory
file:
path: /var/www/_error-pages
state: directory
- name: copy error-pages
copy:
src: error-pages/
dest: /var/www/_error-pages/
- name: copy error-pages.conf
copy:
src: error-pages.conf
dest: /etc/nginx/snippets/