Resolve "migration Jitsi IMIO"

This commit is contained in:
Antoine Ouvrard
2021-03-18 21:46:25 +00:00
parent b2fa0ad1ba
commit 81c28914f8
13 changed files with 221 additions and 30 deletions
@@ -0,0 +1,43 @@
---
- name: Check that the somefile.conf exists
stat:
path: /usr/share/jitsi-meet/scripts/install-letsencrypt-cert-with-param.sh
register: ssl_file
- name: Conf SSL MultiDomain - Duplication du script Let's Encrypt d'origine
copy:
src: /usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh
dest: /usr/share/jitsi-meet/scripts/install-letsencrypt-cert-with-param.sh
mode: u+x
remote_src: yes
when: not ssl_file.stat.exists
- name: Conf SSL MultiDomain - rend le nom de domaine paramétrable dans le script certbot de jitsi
replace:
path: /usr/share/jitsi-meet/scripts/install-letsencrypt-cert-with-param.sh
regexp: '^DOMAIN="\${DEB_CONF_RESULT##\*:}"'
replace: "DOMAIN=$1"
- name: Conf SSL MultiDomain - Exécution du script lets encrypt
shell:
cmd: "/usr/share/jitsi-meet/scripts/install-letsencrypt-cert-with-param.sh {{ item }}"
creates: /etc/letsencrypt/live/{{ item }}/fullchain.pem # Execute le script que si ce fichier n'existe pas
loop: "{{ jitsi_multidomain_domain }}"
- name: Conf Jitsi MultiDomain - Change le ServerName des conf nginx
replace:
path: /etc/nginx/sites-available/{{ item }}.conf
regexp: "[^?]ssl_certificate /etc/letsencrypt/live/{{ inventory_hostname }}.*$"
replace: "ssl_certificate /etc/letsencrypt/live/{{ item }}/fullchain.pem;"
loop: "{{ jitsi_multidomain_domain }}"
notify:
- restart nginx
- name: Conf Jitsi MultiDomain - Change le ServerName des conf nginx
replace:
path: /etc/nginx/sites-available/{{ item }}.conf
regexp: "[^?]ssl_certificate_key /etc/letsencrypt/live/{{ inventory_hostname }}.*$"
replace: "ssl_certificate_key /etc/letsencrypt/live/{{ item }}/privkey.pem;"
loop: "{{ jitsi_multidomain_domain }}"
notify:
- restart nginx