Add error-pages role
This commit is contained in:
parent
61b85e2670
commit
6aa994b056
11
basics.yml
11
basics.yml
|
@ -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
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
5
roles/error-pages/files/error-pages.conf
Normal file
5
roles/error-pages/files/error-pages.conf
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
error_page 502 /_error-pages/502.html;
|
||||||
|
|
||||||
|
location ^~ /_error-pages {
|
||||||
|
root /var/www;
|
||||||
|
}
|
10
roles/error-pages/files/error-pages/502.html
Normal file
10
roles/error-pages/files/error-pages/502.html
Normal 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>
|
BIN
roles/error-pages/files/error-pages/bad_gateway.png
Normal file
BIN
roles/error-pages/files/error-pages/bad_gateway.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
10
roles/error-pages/files/error-pages/style.css
Normal file
10
roles/error-pages/files/error-pages/style.css
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
body {
|
||||||
|
display: flex;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background: white;
|
||||||
|
}
|
15
roles/error-pages/tasks/main.yml
Normal file
15
roles/error-pages/tasks/main.yml
Normal 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/
|
Loading…
Reference in a new issue