From 39438b69b315f981fbc827f668f26a2c6122a85f Mon Sep 17 00:00:00 2001 From: jurgenhaas <juergen@paragon-es.de> Date: Wed, 17 Jul 2019 14:39:38 +0200 Subject: [PATCH] ansible-inventories/arocom#2832 Add custom files for error messages --- files/500.http | 34 ++++++++++++++++++++++++++++++++++ files/502.http | 34 ++++++++++++++++++++++++++++++++++ files/503.http | 34 ++++++++++++++++++++++++++++++++++ files/504.http | 34 ++++++++++++++++++++++++++++++++++ tasks/install.yml | 13 +++++++++++++ 5 files changed, 149 insertions(+) create mode 100644 files/500.http create mode 100644 files/502.http create mode 100644 files/503.http create mode 100644 files/504.http diff --git a/files/500.http b/files/500.http new file mode 100644 index 0000000..05eff13 --- /dev/null +++ b/files/500.http @@ -0,0 +1,34 @@ +HTTP/1.0 500 Internal Server Error +Cache-Control: no-cache +Connection: close +Content-Type: text/html + +<!doctype html> +<!-- 500 Internal Server Error --> +<html> + <title>Site Maintenance | Wartung</title> + <style> + body { text-align: center; padding: 150px; } + h1 { font-size: 50px; } + body { font: 20px Helvetica, sans-serif; color: #333; } + article { display: block; text-align: left; width: 650px; margin: 0 auto; } + a { color: #dc8100; text-decoration: none; } + a:hover { color: #333; text-decoration: none; } + </style> + + <body> + <article> + <h1>We’ll be back soon!</h1> + <div> + <p>Sorry for the inconvenience but we're performing some maintenance at the moment. We'll be back online shortly!</p> + </div> + </article> + + <article> + <h1>Wir sind bald zurück!</h1> + <div> + <p>Wir führen derzeit einige Wartungsarbeiten durch und entschuldigen uns für die Unannehmlichkeiten. Wir sind bald wieder online!</p> + </div> + </article> + </body> +</html> diff --git a/files/502.http b/files/502.http new file mode 100644 index 0000000..2378208 --- /dev/null +++ b/files/502.http @@ -0,0 +1,34 @@ +HTTP/1.0 502 Bad Gateway +Cache-Control: no-cache +Connection: close +Content-Type: text/html + +<!doctype html> +<!-- 502 Bad Gateway --> +<html> + <title>Site Maintenance | Wartung</title> + <style> + body { text-align: center; padding: 150px; } + h1 { font-size: 50px; } + body { font: 20px Helvetica, sans-serif; color: #333; } + article { display: block; text-align: left; width: 650px; margin: 0 auto; } + a { color: #dc8100; text-decoration: none; } + a:hover { color: #333; text-decoration: none; } + </style> + + <body> + <article> + <h1>We’ll be back soon!</h1> + <div> + <p>Sorry for the inconvenience but we're performing some maintenance at the moment. We'll be back online shortly!</p> + </div> + </article> + + <article> + <h1>Wir sind bald zurück!</h1> + <div> + <p>Wir führen derzeit einige Wartungsarbeiten durch und entschuldigen uns für die Unannehmlichkeiten. Wir sind bald wieder online!</p> + </div> + </article> + </body> +</html> diff --git a/files/503.http b/files/503.http new file mode 100644 index 0000000..b15f747 --- /dev/null +++ b/files/503.http @@ -0,0 +1,34 @@ +HTTP/1.0 503 Service Unavailable +Cache-Control: no-cache +Connection: close +Content-Type: text/html + +<!doctype html> +<!-- 503 Service Unavailable --> +<html> + <title>Site Maintenance | Wartung</title> + <style> + body { text-align: center; padding: 150px; } + h1 { font-size: 50px; } + body { font: 20px Helvetica, sans-serif; color: #333; } + article { display: block; text-align: left; width: 650px; margin: 0 auto; } + a { color: #dc8100; text-decoration: none; } + a:hover { color: #333; text-decoration: none; } + </style> + + <body> + <article> + <h1>We’ll be back soon!</h1> + <div> + <p>Sorry for the inconvenience but we're performing some maintenance at the moment. We'll be back online shortly!</p> + </div> + </article> + + <article> + <h1>Wir sind bald zurück!</h1> + <div> + <p>Wir führen derzeit einige Wartungsarbeiten durch und entschuldigen uns für die Unannehmlichkeiten. Wir sind bald wieder online!</p> + </div> + </article> + </body> +</html> diff --git a/files/504.http b/files/504.http new file mode 100644 index 0000000..4ccf7ce --- /dev/null +++ b/files/504.http @@ -0,0 +1,34 @@ +HTTP/1.0 504 Gateway Time-out +Cache-Control: no-cache +Connection: close +Content-Type: text/html + +<!doctype html> +<!-- 504 Gateway Time-out --> +<html> + <title>Site Maintenance | Wartung</title> + <style> + body { text-align: center; padding: 150px; } + h1 { font-size: 50px; } + body { font: 20px Helvetica, sans-serif; color: #333; } + article { display: block; text-align: left; width: 650px; margin: 0 auto; } + a { color: #dc8100; text-decoration: none; } + a:hover { color: #333; text-decoration: none; } + </style> + + <body> + <article> + <h1>We’ll be back soon!</h1> + <div> + <p>Sorry for the inconvenience but we're performing some maintenance at the moment. We'll be back online shortly!</p> + </div> + </article> + + <article> + <h1>Wir sind bald zurück!</h1> + <div> + <p>Wir führen derzeit einige Wartungsarbeiten durch und entschuldigen uns für die Unannehmlichkeiten. Wir sind bald wieder online!</p> + </div> + </article> + </body> +</html> diff --git a/tasks/install.yml b/tasks/install.yml index 66be393..5cb2833 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -53,3 +53,16 @@ owner: root group: root mode: 0755 + +- name: Install error response files + copy: + src: '{{ item }}.http' + dest: /etc/haproxy/errors/{{ item }}.http + owner: root + group: root + mode: 0644 + with_items: + - '500' + - '502' + - '503' + - '504' -- GitLab