From 3a43ff549447aa017bc015856be342644da5cdc1 Mon Sep 17 00:00:00 2001 From: Antoine Ouvrard Date: Thu, 2 Apr 2020 17:26:56 +0200 Subject: [PATCH] =?UTF-8?q?cr=C3=A9ation=20de=20l'arborescence=20et=20des?= =?UTF-8?q?=20premier=20fichiers=20de=20conf=20commun=20=C3=A0=20toutes=20?= =?UTF-8?q?les=20install?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inventory | 6 ++++ playbook.yml | 3 ++ roles/common/tasks/main.yml | 64 +++++++++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 inventory create mode 100644 playbook.yml create mode 100644 roles/common/tasks/main.yml diff --git a/inventory b/inventory new file mode 100644 index 0000000..2658b92 --- /dev/null +++ b/inventory @@ -0,0 +1,6 @@ +visio.imio.be +visio.nereide.fr +visio2.nereide.fr +visio.entrouvert.com +visio443.champs-libres.be +pp.visio.nereide.fr ansible_ssh_user=root diff --git a/playbook.yml b/playbook.yml new file mode 100644 index 0000000..ec63a85 --- /dev/null +++ b/playbook.yml @@ -0,0 +1,3 @@ +- hosts: pp.visio.nereide.fr + roles: + - role: common diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml new file mode 100644 index 0000000..c20239c --- /dev/null +++ b/roles/common/tasks/main.yml @@ -0,0 +1,64 @@ +- name: Ajout de la clé GPG pour le depot jitsi + apt_key: + url: https://download.jitsi.org/jitsi-key.gpg.key +- name: Ajout du depot jitsi + apt_repository: + repo: deb https://download.jitsi.org stable/ +- name: apt update + apt: + update_cache: true +- name: Application du hostname avant installation + debconf: + name: jitsi-meet-web-config + question: jitsi-videobridge/jvb-hostname + value: '{{ hostname }}' + vtype: string +- name: On veut un certificat autogénéré + debconf: + name: jitsi-meet-web-config + question: jitsi-meet/cert-choice + value: "Generate a new self-signed certificate (You will later get a chance to obtain a Let's encrypt certificate)" + vtype: string +- name: installation de jitsi + apt: + name: jitsi-meet +- name: Configuration de let's encrypt + script: library/jitsi-letsencrypt.sh > jitsi-letsencrypt.log +- name: Conf Jitsi - UI en fr + lineinfile: + path: /etc/jitsi/meet/{{ hostname }}-config.js + regexp: '^defaultLanguage:' + insertafter: "// defaultLanguage: 'en'" + line: " defaultLanguage: 'fr'," +- name: Conf Jitsi - webcam en qualité medium par defaut 1/2 + lineinfile: + path: /etc/jitsi/meet/{{ hostname }}-config.js + regexp: '^resolution:' + insertafter: "// resolution: 720" + line: " resolution: 360," +- name: Conf Jitsi - webcam en qualité medium par defaut 2/2 + blockinfile: + path: /etc/jitsi/meet/{{ hostname }}-config.js + marker: "// {mark} ANSIBLE MANAGED BLOCK" + insertafter: "// ratio of 16:9 with an ideal resolution of 720." + block: | + constraints: { + video: { + aspectRatio: 16 / 9, + height: { + ideal: 360, + max: 360, + min: 240 + } + } + }, +- name: Conf Jitsi - Désactive l'effet floutage d'arrière plan + replace: + path: /usr/share/jitsi-meet/interface_config.js + regexp: "'videobackgroundblur'," + replace: "" +- name: Conf Jitsi - Active une alerte pour les utilisateurs de Firefox + replace: + path: /usr/share/jitsi-meet/interface_config.js + regexp: "'firefox'," + replace: ""