From 81c28914f8dbc78ebbdf328097ae338380b934cc Mon Sep 17 00:00:00 2001 From: Antoine Ouvrard Date: Thu, 18 Mar 2021 21:46:25 +0000 Subject: Resolve "migration Jitsi IMIO" --- roles/jitsi-enable-specific-imio/handlers/main.yml | 5 ++ roles/jitsi-enable-specific-imio/tasks/main.yml | 66 ++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 roles/jitsi-enable-specific-imio/handlers/main.yml create mode 100644 roles/jitsi-enable-specific-imio/tasks/main.yml (limited to 'roles/jitsi-enable-specific-imio') diff --git a/roles/jitsi-enable-specific-imio/handlers/main.yml b/roles/jitsi-enable-specific-imio/handlers/main.yml new file mode 100644 index 0000000..a7e57e5 --- /dev/null +++ b/roles/jitsi-enable-specific-imio/handlers/main.yml @@ -0,0 +1,5 @@ +--- +- name: reload nginx + systemd: + name: nginx + state: reloaded \ No newline at end of file diff --git a/roles/jitsi-enable-specific-imio/tasks/main.yml b/roles/jitsi-enable-specific-imio/tasks/main.yml new file mode 100644 index 0000000..9473861 --- /dev/null +++ b/roles/jitsi-enable-specific-imio/tasks/main.yml @@ -0,0 +1,66 @@ +--- +- name: création du répertoire pour recevoir les fichiers statiques de IMIO + file: + path: /usr/share/jitsi-meet/static-imio + state: directory + +- name: personnalise la config nginx de l'accès jitsi principal + blockinfile: + path: /etc/nginx/sites-enabled/{{ inventory_hostname }}.conf + marker: "# {mark} ANSIBLE MANAGED BLOCK" + insertafter: "gzip_min_length 512;" + block: | + ### Pages static + location = /rgpd { + try_files /static-imio/imio-rgpd.html =404; + } + + location ~ ^/$ { + try_files /static-imio/imio-index.html =404; + } + + location ~ ^/static-imio/(.*)$ { + alias /usr/share/jitsi-meet/static-imio/$1; + } + notify: + - reload nginx + +- name: personnalise la config nginx de l'accès à cpas + blockinfile: + path: /etc/nginx/sites-enabled/{{ jitsi_multidomain_domain[0] }}.conf + marker: "# {mark} ANSIBLE MANAGED BLOCK" + insertafter: "gzip_min_length 512;" + block: | + #### Pages static + location = /cpas { + try_files /static-imio/cpas-cpas.html =404; + } + + location = /rgpd { + try_files /static-imio/cpas-rgpd.html =404; + } + + location ~ ^/$ { + try_files /static-imio/cpas-index.html =404; + } + + location ~ ^/static-imio/(.*)$ { + alias /usr/share/jitsi-meet/static-imio/$1; + } + notify: + - reload nginx + +- name: gestion du cookie la config nginx + blockinfile: + path: /etc/nginx/sites-enabled/{{ item }}.conf + marker: "# {mark} ANSIBLE MANAGED COOKIE BLOCK" + insertbefore: 'try_files \$uri @root_path' + block: | + # Ajout du cookie + set $room $1; + if ($http_cookie !~* "rgpd") { + return 302 $scheme://$host/rgpd?room=$room; + } + loop: "{{ jitsi_multidomain_domain }}" + notify: + - reload nginx \ No newline at end of file -- cgit v1.2.3