diff --git a/files/roskomnadzor.html b/files/roskomnadzor.html new file mode 100644 index 0000000..62f7b7d --- /dev/null +++ b/files/roskomnadzor.html @@ -0,0 +1,42 @@ + + + + + + + + Blocked in Russia + + + + +

+ Blocked in Russia +

+ +

+ This information is illegal in Russia. +

+ + Roskomnadzor-chan + + diff --git a/files/roskomnadzor.jpg b/files/roskomnadzor.jpg new file mode 100644 index 0000000..43517f5 Binary files /dev/null and b/files/roskomnadzor.jpg differ diff --git a/tasks/install.yml b/tasks/install.yml index b2939ff..8e7f0b3 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -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' diff --git a/tasks/purge.yml b/tasks/purge.yml index eec6a8c..b5b11ea 100644 --- a/tasks/purge.yml +++ b/tasks/purge.yml @@ -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' diff --git a/templates/roskomnadzor.conf b/templates/roskomnadzor.conf new file mode 100644 index 0000000..50a19c0 --- /dev/null +++ b/templates/roskomnadzor.conf @@ -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 }}; }