summaryrefslogtreecommitdiff
path: root/roles/jibri-install/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/jibri-install/tasks')
-rw-r--r--roles/jibri-install/tasks/install-chromedriver.yml25
-rw-r--r--roles/jibri-install/tasks/install-googlechrome.yml29
-rw-r--r--roles/jibri-install/tasks/install-jibri.yml61
-rw-r--r--roles/jibri-install/tasks/main.yml5
-rw-r--r--roles/jibri-install/tasks/pre-install.yml5
5 files changed, 125 insertions, 0 deletions
diff --git a/roles/jibri-install/tasks/install-chromedriver.yml b/roles/jibri-install/tasks/install-chromedriver.yml
new file mode 100644
index 0000000..80c80ea
--- /dev/null
+++ b/roles/jibri-install/tasks/install-chromedriver.yml
@@ -0,0 +1,25 @@
+---
+- block:
+ - name: installation de unzip
+ apt:
+ pkg:
+ - unzip
+ - name: récupération de la version pour chromedriver
+ uri:
+ url: "https://chromedriver.storage.googleapis.com/LATEST_RELEASE"
+ method: GET
+ return_content: true
+ status_code: 200
+ register: _latest_release
+ until: _latest_release.status == 200
+ retries: 5
+ - name: répertoire du binaire pour chromedriver
+ file:
+ state: directory
+ path: /usr/local/bin/
+ - name: "télécharge de chromedriver pour la version {{ _latest_release.content }}"
+ unarchive:
+ src: "http://chromedriver.storage.googleapis.com/{{ _latest_release.content }}/chromedriver_linux64.zip"
+ dest: /usr/local/bin
+ mode: "755"
+ remote_src: true \ No newline at end of file
diff --git a/roles/jibri-install/tasks/install-googlechrome.yml b/roles/jibri-install/tasks/install-googlechrome.yml
new file mode 100644
index 0000000..c2be7c6
--- /dev/null
+++ b/roles/jibri-install/tasks/install-googlechrome.yml
@@ -0,0 +1,29 @@
+---
+- name: Import de la clé GPG google
+ apt_key:
+ id: 4CCA1EAF950CEE4AB83976DCA040830F7FAC5991
+ url: https://dl-ssl.google.com/linux/linux_signing_key.pub
+ keyring: /etc/apt/trusted.gpg.d/google.gpg
+
+- name: Ajout du depot google
+ apt_repository:
+ repo: deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/google.gpg] http://dl.google.com/linux/chrome/deb/ stable main
+ update_cache: true
+ filename: google-chrome
+
+- name: install google-chrome-stable
+ apt:
+ pkg:
+ - google-chrome-stable
+
+- name: désactive l'avertissement chrome est contrôllé par un autre logiciel
+ block:
+ - name: répertoire policies
+ file:
+ state: directory
+ path: /etc/opt/chrome/policies/managed
+ - name: CommandLineFlagSecurityWarningsEnabled
+ copy:
+ dest: /etc/opt/chrome/policies/managed/managed_policies.json
+ content: |
+ { "CommandLineFlagSecurityWarningsEnabled": false }
diff --git a/roles/jibri-install/tasks/install-jibri.yml b/roles/jibri-install/tasks/install-jibri.yml
new file mode 100644
index 0000000..c4e4925
--- /dev/null
+++ b/roles/jibri-install/tasks/install-jibri.yml
@@ -0,0 +1,61 @@
+---
+- name: vérification des variables obligatoire
+ fail:
+ msg: |
+ il faut définir les variables `jibri_user` et
+ `jibri_password`, `jitsi_server_host` pour utiliser ce role
+ when: (jibri_user is not defined) or
+ (jibri_password is not defined) or
+ (jitsi_server_host is not defined)
+
+# source: https://github.com/jitsi/jibri#jitsi-debian-repository
+- name: Import de la clé GPG
+ apt_key:
+ id: FFD65A0DA2BEBDEB73D44C8BB4D2D216F1FD7806
+ url: https://download.jitsi.org/jitsi-key.gpg.key
+ keyring: /etc/apt/trusted.gpg.d/jitsi.gpg
+
+- name: Ajout du depot jitsi
+ apt_repository:
+ repo: deb [signed-by=/etc/apt/trusted.gpg.d/jitsi.gpg] https://download.jitsi.org stable/
+ update_cache: true
+
+- name: install jibri
+ apt:
+ pkg:
+ - jibri
+ notify: restart jibri
+
+- name: configure jibri
+ template:
+ src: ../templates/jibri.conf
+ dest: /etc/jitsi/jibri/jibri.conf
+ notify: restart jibri
+
+- name: configure xorg
+ lineinfile:
+ path: /etc/jitsi/jibri/xorg-video-dummy.conf
+ regexp: "[^?]Virtual "
+ line: " Virtual 1280 720"
+ notify:
+ - restart jibri
+ - restart jibri-xorg
+
+- name: configure les cookies (fichier)
+ copy:
+ src: ../files/chrome-extension-cookie
+ dest: /opt/
+ mode: '644'
+ directory_mode: '755'
+ when:
+ - jitsi_cookie_enabled is defined
+ - jitsi_cookie_enabled
+
+- name: configure les cookies (template)
+ template:
+ src: ../templates/chrome-extension-background.js.j2
+ dest: /opt/chrome-extension-cookie/background.js
+ mode: '644'
+ when:
+ - jitsi_cookie_enabled is defined
+ - jitsi_cookie_enabled
diff --git a/roles/jibri-install/tasks/main.yml b/roles/jibri-install/tasks/main.yml
new file mode 100644
index 0000000..c229dc5
--- /dev/null
+++ b/roles/jibri-install/tasks/main.yml
@@ -0,0 +1,5 @@
+---
+- include_tasks: pre-install.yml
+- include_tasks: install-chromedriver.yml
+- include_tasks: install-googlechrome.yml
+- include_tasks: install-jibri.yml
diff --git a/roles/jibri-install/tasks/pre-install.yml b/roles/jibri-install/tasks/pre-install.yml
new file mode 100644
index 0000000..c102b4b
--- /dev/null
+++ b/roles/jibri-install/tasks/pre-install.yml
@@ -0,0 +1,5 @@
+---
+- name: Activation du module snd-aloop
+ modprobe:
+ name: snd-aloop
+ state: present