diff options
| author | Antoine Ouvrard <antoine.ouvrard@nereide.fr> | 2021-03-18 21:46:26 +0000 |
|---|---|---|
| committer | Antoine Ouvrard <antoine.ouvrard@nereide.fr> | 2021-03-18 21:46:26 +0000 |
| commit | 1dd3f5b7593fa25b812927ff87a3c3e5c5e25f6d (patch) | |
| tree | 461b14c98533074461729a11cd82d2e015cb690f /roles/jitsi-enable-specific-imio/tasks | |
| parent | b2fa0ad1ba62ba0269d1ac1ebf8ac056b532a2b7 (diff) | |
| parent | 81c28914f8dbc78ebbdf328097ae338380b934cc (diff) | |
Merge branch '4-parametrage-multi-domaine' into 'master'
Resolve "migration Jitsi IMIO"
Closes #4 et #9
See merge request 10031/visio!6
Diffstat (limited to 'roles/jitsi-enable-specific-imio/tasks')
| -rw-r--r-- | roles/jitsi-enable-specific-imio/tasks/main.yml | 66 |
1 files changed, 66 insertions, 0 deletions
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 |
