Add Roskomnadzor snippet

This commit is contained in:
Alex Kotov 2023-08-17 14:59:09 +04:00
parent 787a68c15c
commit c7ec86c730
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
5 changed files with 56 additions and 5 deletions

42
files/roskomnadzor.html Normal file
View File

@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width,
initial-scale=1,
maximum-scale=1,
shrink-to-fit=no,
user-scalable=no"/>
<title>Blocked in Russia</title>
<style>
.center-text { text-align: center; }
.center {
display: block;
margin-left: auto;
margin-right: auto;
}
.responsive {
width: 100%;
max-width: 500px;
height: auto;
}
</style>
</head>
<body>
<h1 class="center-text">
Blocked in Russia
</h1>
<p class="center-text">
This information is illegal in Russia.
</p>
<img
src="/roskomnadzor.jpg"
class="center responsive"
alt="Roskomnadzor-chan"/>
</body>
</html>

BIN
files/roskomnadzor.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 KiB

View File

@ -85,7 +85,7 @@
group: root
with_items: '{{ nginx__sites }}'
- name: Install maintenance files
- name: Install additional files
notify: nginx | Restart Nginx
copy:
src: 'files/{{ item }}'
@ -96,12 +96,17 @@
with_items:
- 'maintenance.html'
- 'maintenance.jpg'
- 'roskomdanzor.html'
- 'roskomdanzor.jpg'
- name: Install maintenance snippet
- name: Install additional snippets
notify: nginx | Restart Nginx
template:
src: 'templates/maintenance.conf'
dest: '{{ nginx__snippets_dir }}/maintenance.conf'
src: 'templates/{{ item }}.conf'
dest: '{{ nginx__snippets_dir }}/{{ item }}.conf'
mode: 'u=rw,go=r'
owner: root
group: root
with_items:
- 'maintenance'
- 'roskomdanzor'

View File

@ -13,10 +13,12 @@
state: absent
path: '{{ nginx__dir_etc }}'
- name: Delete maintenance files
- name: Delete additional files
file:
state: absent
path: '{{ nginx__dir_www_html }}/{{ item }}'
with_items:
- 'maintenance.html'
- 'maintenance.jpg'
- 'roskomdanzor.html'
- 'roskomdanzor.jpg'

View File

@ -0,0 +1,2 @@
location @roskomnadzor { root {{ nginx__dir_www_html }}; try_files /roskomnadzor.html roskomnadzor.html; }
location = /roskomnadzor.jpg { root {{ nginx__dir_www_html }}; }