Add error-pages role
This commit is contained in:
parent
61b85e2670
commit
6aa994b056
7 changed files with 48 additions and 16 deletions
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…
Add table
Add a link
Reference in a new issue