mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-08-04 07:37:20 +02:00
Update to 2024-07-22 23:00
This commit is contained in:
@@ -3,8 +3,13 @@
|
||||
- name: Remove temp files
|
||||
file: path={{ item }} state=absent
|
||||
loop:
|
||||
- "{{ jitsi_root_dir }}/tmp/jicofo-1.1-SNAPSHOT"
|
||||
- "{{ jitsi_root_dir }}/src/jicofo/target"
|
||||
- "{{ jitsi_root_dir }}/tmp/jicofo-stable-jitsi-meet_{{ jitsi_version }}.tar.gz"
|
||||
- "{{ jitsi_root_dir }}/tmp/jicofo-stable-jitsi-meet_{{ jitsi_version }}"
|
||||
- "{{ jitsi_root_dir }}/tmp/jigasi-master.tar.gz"
|
||||
- "{{ jitsi_root_dir }}/tmp/jigasi-master"
|
||||
- "{{ jitsi_root_dir }}/tmp/jigasi-linux-x64-1.1-SNAPSHOT"
|
||||
- "{{ jitsi_root_dir }}/src/jigasi/target"
|
||||
- "{{ jitsi_root_dir }}/tmp/jitsi-meet-stable-jitsi-meet_{{ jitsi_version }}.tar.gz"
|
||||
- "{{ jitsi_root_dir }}/tmp/jitsi-meet-stable-jitsi-meet_{{ jitsi_version }}"
|
||||
- "{{ jitsi_root_dir }}/tmp/excalidraw-backend-{{ jitsi_excalidraw_version }}.tar.gz"
|
||||
- "{{ jitsi_root_dir }}/tmp/excalidraw-backend-{{ jitsi_excalidraw_version }}"
|
||||
tags: jitsi
|
||||
|
@@ -8,7 +8,7 @@
|
||||
|
||||
- name: Register XMPP accounts
|
||||
block:
|
||||
- name: Reload prosody
|
||||
- name: Restart prosody
|
||||
service: name=prosody state=restarted
|
||||
|
||||
- name: register XMPP users
|
||||
|
@@ -12,14 +12,6 @@
|
||||
owner: "{{ jitsi_user }}"
|
||||
group: "{{ jitsi_user }}"
|
||||
mode: 700
|
||||
- dir: "{{ jitsi_root_dir }}/src/videobridge"
|
||||
owner: "{{ jitsi_user }}"
|
||||
- dir: "{{ jitsi_root_dir }}/src/jicofo"
|
||||
owner: "{{ jitsi_user }}"
|
||||
- dir: "{{ jitsi_root_dir }}/src/jigasi"
|
||||
owner: "{{ jitsi_user }}"
|
||||
- dir: "{{ jitsi_root_dir }}/src/meet"
|
||||
owner: "{{ jitsi_user }}"
|
||||
- dir: "{{ jitsi_root_dir }}/videobridge"
|
||||
- dir: "{{ jitsi_root_dir }}/jibri"
|
||||
- dir: "{{ jitsi_root_dir }}/jicofo"
|
||||
@@ -51,4 +43,6 @@
|
||||
group: "{{ jitsi_user }}"
|
||||
mode: 700
|
||||
- dir: "{{ jitsi_root_dir }}/confmapper"
|
||||
- dir: "{{ jitsi_root_dir }}/prosody/modules"
|
||||
- dir: "{{ jitsi_root_dir }}/excalidraw"
|
||||
tags: jitsi
|
||||
|
@@ -4,6 +4,46 @@
|
||||
set_fact: jitsi_jigasi={{ (jitsi_jigasi_sip_user is defined and jitsi_jigasi_sip_secret is defined) | ternary(True, False) }}
|
||||
tags: jitsi
|
||||
|
||||
# Detect jicofo version, if already installed
|
||||
- block:
|
||||
- import_tasks: ../includes/webapps_set_install_mode.yml
|
||||
vars:
|
||||
- root_dir: "{{ jitsi_root_dir }}"
|
||||
- version: "{{ jitsi_version }}"
|
||||
- version_file: ansible_jicofo_version
|
||||
- set_fact: jitsi_jicofo_install_mode={{ install_mode }}
|
||||
tags: jitsi
|
||||
|
||||
# Detect jigasi version, if already installed
|
||||
- block:
|
||||
- import_tasks: ../includes/webapps_set_install_mode.yml
|
||||
vars:
|
||||
- root_dir: "{{ jitsi_root_dir }}"
|
||||
- version: "{{ jitsi_version }}"
|
||||
- version_file: ansible_jigasi_version
|
||||
- set_fact: jitsi_jigasi_install_mode={{ install_mode }}
|
||||
tags: jitsi
|
||||
|
||||
# Detect meet version, if already installed
|
||||
- block:
|
||||
- import_tasks: ../includes/webapps_set_install_mode.yml
|
||||
vars:
|
||||
- root_dir: "{{ jitsi_root_dir }}"
|
||||
- version: "{{ jitsi_version }}"
|
||||
- version_file: ansible_meet_version
|
||||
- set_fact: jitsi_meet_install_mode={{ install_mode }}
|
||||
tags: jitsi
|
||||
|
||||
# Detect excalidraw version, if already installed
|
||||
- block:
|
||||
- import_tasks: ../includes/webapps_set_install_mode.yml
|
||||
vars:
|
||||
- root_dir: "{{ jitsi_root_dir }}"
|
||||
- version: "{{ jitsi_excalidraw_version }}"
|
||||
- version_file: ansible_excalidraw_version
|
||||
- set_fact: jitsi_excalidraw_install_mode={{ install_mode }}
|
||||
tags: jitsi
|
||||
|
||||
- name: Generate a random secret for videobridge
|
||||
block:
|
||||
- import_tasks: ../includes/get_rand_pass.yml
|
||||
@@ -97,17 +137,3 @@
|
||||
register: jitsi_key_file
|
||||
tags: jitsi
|
||||
|
||||
- name: Check if jicofo is built
|
||||
stat: path={{ jitsi_root_dir }}/jicofo/jicofo.sh
|
||||
register: jitsi_jicofo_script
|
||||
tags: jitsi
|
||||
|
||||
- name: Check if jigasi is built
|
||||
stat: path={{ jitsi_root_dir }}/jigasi/jigasi.sh
|
||||
register: jitsi_jigasi_script
|
||||
tags: jitsi
|
||||
|
||||
- name: Check if meet is installed
|
||||
stat: path={{ jitsi_root_dir }}/meet/index.html
|
||||
register: jitsi_meet_index
|
||||
tags: jitsi
|
||||
|
@@ -3,38 +3,19 @@
|
||||
- name: Install dependencies
|
||||
yum:
|
||||
name:
|
||||
- java-11-openjdk-devel
|
||||
- java-17-openjdk-devel
|
||||
- git
|
||||
- nodejs # needed to build meet
|
||||
- libXScrnSaver # needed for jigasi
|
||||
- python3 # needed for confmapper
|
||||
- make
|
||||
tags: jitsi
|
||||
|
||||
- name: Detect exact JRE version
|
||||
command: rpm -q java-11-openjdk
|
||||
changed_when: False
|
||||
register: jitsi_jre11_version
|
||||
tags: jitsi
|
||||
|
||||
- name: Select JRE 11 as default version
|
||||
alternatives:
|
||||
name: "{{ item.name }}"
|
||||
link: "{{ item.link }}"
|
||||
path: "{{ item.path }}"
|
||||
loop:
|
||||
- name: java
|
||||
link: /usr/bin/java
|
||||
path: /usr/lib/jvm/{{ jitsi_jre11_version.stdout | trim }}/bin/java
|
||||
- name: javac
|
||||
link: /usr/bin/javac
|
||||
path: /usr/lib/jvm/{{ jitsi_jre11_version.stdout | trim }}/bin/javac
|
||||
- name: jre_openjdk
|
||||
link: /usr/lib/jvm/jre-openjdk
|
||||
path: /usr/lib/jvm/{{ jitsi_jre11_version.stdout | trim }}
|
||||
- name: java_sdk_openjdk
|
||||
link: /usr/lib/jvm/java-openjdk
|
||||
path: /usr/lib/jvm/{{ jitsi_jre11_version.stdout | trim }}
|
||||
- lua-ldap # All the lua libs are for prosody
|
||||
- lua-cyrussasl
|
||||
- lua-cjson
|
||||
- lua-basexx
|
||||
- lua-luaossl
|
||||
- lua-inspect
|
||||
- libjwt
|
||||
tags: jitsi
|
||||
|
||||
# If you use an Let's Encrypt cert, it might not be there yet. In this case, create a link
|
||||
@@ -50,89 +31,140 @@
|
||||
when: not jitsi_key_file.stat.exists
|
||||
tags: jitsi
|
||||
|
||||
# This file used to contain proxy settings for maven
|
||||
# now this is handled in a maven general dir, so remove it from here
|
||||
- name: Remove local maven configuration
|
||||
file: path={{ jitsi_root_dir }}/.m2/settings.xml state=absent
|
||||
- name: Install prosody modules
|
||||
synchronize:
|
||||
src: prosody/modules/
|
||||
dest: "{{ jitsi_root_dir }}/prosody/modules/"
|
||||
recursive: true
|
||||
notify: restart prosody
|
||||
tags: jitsi
|
||||
|
||||
# Now, for every component, we will clone or update the repo.
|
||||
# If the repo changed since the last run, we rebuild and restart the corresponding component
|
||||
- name: Clone jicofo repo
|
||||
git:
|
||||
repo: "{{ jitsi_jicofo_git_url }}"
|
||||
dest: "{{ jitsi_root_dir }}/src/jicofo"
|
||||
force: True
|
||||
depth: 1
|
||||
single_branch: True
|
||||
become_user: "{{ jitsi_user }}"
|
||||
register: jitsi_jicofo_git
|
||||
- name: Install bypass_pwd module for prosody
|
||||
template: src=mod_jibri_bypass_pwd.lua.j2 dest={{ jitsi_root_dir }}/prosody/modules/mod_jibri_bypass_pwd.lua
|
||||
notify: restart prosody
|
||||
tags: jitsi
|
||||
|
||||
- name: Install or update jicofo
|
||||
- when: jitsi_jicofo_install_mode != 'none'
|
||||
block:
|
||||
- name: Download Jitsi jicofo archive
|
||||
get_url:
|
||||
url: "{{ jitsi_jicofo_archive_url }}"
|
||||
dest: "{{ jitsi_root_dir }}/tmp"
|
||||
checksum: sha256:{{ jitsi_jicofo_archive_sha256 }}
|
||||
become_user: "{{ jitsi_user }}"
|
||||
|
||||
- name: Extract Jitsi Jicofo archive
|
||||
unarchive:
|
||||
src: "{{ jitsi_root_dir }}/tmp/jicofo-stable-jitsi-meet_{{ jitsi_version }}.tar.gz"
|
||||
dest: "{{ jitsi_root_dir }}/tmp/"
|
||||
remote_src: true
|
||||
become_user: "{{ jitsi_user }}"
|
||||
|
||||
- name: Build jicofo
|
||||
command: /opt/maven/apache-maven/bin/mvn package -DskipTests -Dassembly.skipAssembly=false
|
||||
args:
|
||||
chdir: "{{ jitsi_root_dir }}/src/jicofo"
|
||||
chdir: "{{ jitsi_root_dir }}/tmp/jicofo-stable-jitsi-meet_{{ jitsi_version }}"
|
||||
environment:
|
||||
JAVA_HOME: /usr/lib/jvm/java-17
|
||||
become_user: "{{ jitsi_user }}"
|
||||
|
||||
- name: Extract jicofo archive
|
||||
unarchive:
|
||||
src: "{{ jitsi_root_dir }}/src/jicofo/jicofo/target/jicofo-1.1-SNAPSHOT-archive.zip"
|
||||
dest: "{{ jitsi_root_dir }}/tmp/"
|
||||
remote_src: True
|
||||
- name: Install jicofo jar
|
||||
copy:
|
||||
src: "{{ jitsi_root_dir }}/tmp/jicofo-stable-jitsi-meet_{{ jitsi_version }}/jicofo/target/jicofo-1.1-SNAPSHOT-jar-with-dependencies.jar"
|
||||
dest: "{{ jitsi_root_dir }}/jicofo/jicofo.jar"
|
||||
remote_src: true
|
||||
|
||||
- name: Install jicofo startup script
|
||||
copy:
|
||||
src: "{{ jitsi_root_dir }}/tmp/jicofo-stable-jitsi-meet_{{ jitsi_version }}/resources/jicofo.sh"
|
||||
dest: "{{ jitsi_root_dir }}/jicofo/jicofo.sh"
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: root
|
||||
remote_src: true
|
||||
|
||||
- name: Write version
|
||||
copy: content={{ jitsi_version }} dest={{ jitsi_root_dir }}/meta/ansible_jicofo_version
|
||||
|
||||
- name: Move jicofo to its final directory
|
||||
synchronize:
|
||||
src: "{{ jitsi_root_dir }}/tmp/jicofo-1.1-SNAPSHOT/"
|
||||
dest: "{{ jitsi_root_dir }}/jicofo/"
|
||||
recursive: True
|
||||
delete: True
|
||||
compress: False
|
||||
delegate_to: "{{ inventory_hostname }}"
|
||||
notify: restart jitsi-jicofo
|
||||
when: (jitsi_jicofo_git.changed and jitsi_manage_upgrade) or not jitsi_jicofo_script.stat.exists
|
||||
tags: jitsi
|
||||
|
||||
- name: Clone jigasi repo
|
||||
git:
|
||||
repo: "{{ jitsi_jigasi_git_url }}"
|
||||
dest: "{{ jitsi_root_dir }}/src/jigasi"
|
||||
force: True
|
||||
depth: 1
|
||||
single_branch: True
|
||||
become_user: "{{ jitsi_user }}"
|
||||
register: jitsi_jigasi_git
|
||||
tags: jitsi
|
||||
|
||||
- name: Install or update jigasi
|
||||
- when: jitsi_jigasi_install_mode != 'none'
|
||||
block:
|
||||
- name: Download Jitsi jigasi archive
|
||||
get_url:
|
||||
url: "{{ jitsi_jigasi_archive_url }}"
|
||||
dest: "{{ jitsi_root_dir }}/tmp"
|
||||
become_user: "{{ jitsi_user }}"
|
||||
|
||||
- name: Extract Jitsi Jigasi archive
|
||||
unarchive:
|
||||
src: "{{ jitsi_root_dir }}/tmp/jigasi-master.tar.gz"
|
||||
dest: "{{ jitsi_root_dir }}/tmp/"
|
||||
remote_src: true
|
||||
become_user: "{{ jitsi_user }}"
|
||||
|
||||
- name: Build jigasi
|
||||
command: /opt/maven/apache-maven/bin/mvn package -DskipTests -Dassembly.skipAssembly=false
|
||||
args:
|
||||
chdir: "{{ jitsi_root_dir }}/src/jigasi"
|
||||
chdir: "{{ jitsi_root_dir }}/tmp/jigasi-master"
|
||||
environment:
|
||||
JAVA_HOME: /usr/lib/jvm/java-17
|
||||
become_user: "{{ jitsi_user }}"
|
||||
|
||||
- name: Extract jigasi archive
|
||||
unarchive:
|
||||
src: "{{ jitsi_root_dir }}/src/jigasi/target/jigasi-linux-x64-1.1-SNAPSHOT.zip"
|
||||
src: "{{ jitsi_root_dir }}/tmp/jigasi-master/target/jigasi-linux-x64-1.1-SNAPSHOT.zip"
|
||||
dest: "{{ jitsi_root_dir }}/tmp/"
|
||||
remote_src: True
|
||||
|
||||
# - name: Link libunix-java lib
|
||||
# file: src=libunix-0.5.1.so dest={{ jitsi_root_dir }}/tmp/jigasi-linux-x64-1.1-SNAPSHOT/lib/libunix-java.so state=link
|
||||
remote_src: true
|
||||
|
||||
- name: Move jigasi to its final directory
|
||||
synchronize:
|
||||
src: "{{ jitsi_root_dir }}/tmp/jigasi-linux-x64-1.1-SNAPSHOT/"
|
||||
dest: "{{ jitsi_root_dir }}/jigasi/"
|
||||
recursive: True
|
||||
delete: True
|
||||
compress: False
|
||||
recursive: true
|
||||
delete: true
|
||||
compress: false
|
||||
delegate_to: "{{ inventory_hostname }}"
|
||||
notify: restart jitsi-jigasi
|
||||
when: (jitsi_jigasi_git.changed and jitsi_manage_upgrade) or not jitsi_jigasi_script.stat.exists
|
||||
|
||||
- name: Write version
|
||||
copy: content={{ jitsi_version }} dest={{ jitsi_root_dir }}/meta/ansible_jigasi_version
|
||||
|
||||
tags: jitsi
|
||||
|
||||
- when: jitsi_excalidraw_install_mode != 'none'
|
||||
block:
|
||||
|
||||
- name: Download Excalidraw backend
|
||||
get_url:
|
||||
url: "{{ jitsi_excalidraw_archive_url }}"
|
||||
dest: "{{ jitsi_root_dir }}/tmp"
|
||||
checksum: sha256:{{ jitsi_excalidraw_archive_sha256 }}
|
||||
become_user: "{{ jitsi_user }}"
|
||||
|
||||
- name: Extract Excalidraw archive
|
||||
unarchive:
|
||||
src: "{{ jitsi_root_dir }}/tmp/excalidraw-backend-{{ jitsi_excalidraw_version }}.tar.gz"
|
||||
dest: "{{ jitsi_root_dir }}/tmp/"
|
||||
remote_src: true
|
||||
become_user: "{{ jitsi_user }}"
|
||||
|
||||
- name: Install node dependencies
|
||||
npm: path={{ jitsi_root_dir }}/tmp/excalidraw-backend-{{ jitsi_excalidraw_version }}
|
||||
become_user: "{{ jitsi_user }}"
|
||||
|
||||
- name: Install Excalidraw backend
|
||||
synchronize:
|
||||
src: "{{ jitsi_root_dir }}/tmp/excalidraw-backend-{{ jitsi_excalidraw_version }}/"
|
||||
dest: "{{ jitsi_root_dir }}/excalidraw/"
|
||||
recursive: true
|
||||
delete: true
|
||||
compress: false
|
||||
delegate_to: "{{ inventory_hostname }}"
|
||||
|
||||
- name: Write installed version
|
||||
copy: content={{ jitsi_excalidraw_version }} dest={{ jitsi_root_dir }}/meta/ansible_excalidraw_version
|
||||
|
||||
tags: jitsi
|
||||
|
||||
- name: Deploy systemd unit
|
||||
@@ -141,11 +173,13 @@
|
||||
- jitsi-jicofo
|
||||
- jitsi-jigasi
|
||||
- jitsi-confmapper
|
||||
- jitsi-excalidraw
|
||||
register: jitsi_units
|
||||
notify:
|
||||
- restart jitsi-jicofo
|
||||
- restart jitsi-jigasi
|
||||
- restart jitsi-confmapper
|
||||
- restart jitsi-excalidraw
|
||||
tags: jitsi
|
||||
|
||||
- name: Reload systemd
|
||||
@@ -153,39 +187,35 @@
|
||||
when: jitsi_units.results | selectattr('changed', 'equalto', True) | list | length > 0
|
||||
tags: jitsi
|
||||
|
||||
- name: Clone jitsi meet
|
||||
git:
|
||||
repo: "{{ jitsi_meet_git_url }}"
|
||||
dest: "{{ jitsi_root_dir }}/src/meet"
|
||||
force: True
|
||||
depth: 1
|
||||
single_branch: True
|
||||
register: jitsi_meet_git
|
||||
become_user: "{{ jitsi_user }}"
|
||||
tags: jitsi
|
||||
|
||||
- name: Install or update jitsi meet
|
||||
- when: jitsi_meet_install_mode != 'none'
|
||||
block:
|
||||
- name: Download Jitsi Meet archive
|
||||
get_url:
|
||||
url: "{{ jitsi_meet_archive_url }}"
|
||||
dest: "{{ jitsi_root_dir }}/tmp"
|
||||
checksum: sha256:{{ jitsi_meet_archive_sha256 }}
|
||||
become_user: "{{ jitsi_user }}"
|
||||
|
||||
- name: Extract Jitsi Meet archive
|
||||
unarchive:
|
||||
src: "{{ jitsi_root_dir }}/tmp/jitsi-meet-stable-jitsi-meet_{{ jitsi_version }}.tar.gz"
|
||||
dest: "{{ jitsi_root_dir }}/tmp/"
|
||||
remote_src: true
|
||||
become_user: "{{ jitsi_user }}"
|
||||
|
||||
- name: Clear node_modules cache
|
||||
file: path={{ jitsi_root_dir }}/src/meet/node_modules state=absent
|
||||
file: path={{ jitsi_root_dir }}/tmp/jitsi-meet-stable-jitsi-meet_{{ jitsi_version }}/node_modules state=absent
|
||||
|
||||
- name: Install jitsi meet node dependencies
|
||||
npm: path={{ jitsi_root_dir }}/src/meet
|
||||
npm: path={{ jitsi_root_dir }}/tmp/jitsi-meet-stable-jitsi-meet_{{ jitsi_version }}
|
||||
become_user: "{{ jitsi_user }}"
|
||||
|
||||
- name: Build jitsi meet
|
||||
command: make
|
||||
args:
|
||||
chdir: "{{ jitsi_root_dir }}/src/meet"
|
||||
chdir: "{{ jitsi_root_dir }}/tmp/jitsi-meet-stable-jitsi-meet_{{ jitsi_version }}"
|
||||
become_user: "{{ jitsi_user }}"
|
||||
|
||||
#- name: Reset git (so next run won't detect a change)
|
||||
# command: git checkout {{ jitsi_root_dir }}/src/meet/resources/load-test/package-lock.json
|
||||
# changed_when: False
|
||||
# args:
|
||||
# chdir: "{{ jitsi_root_dir }}/src/meet"
|
||||
# become_user: "{{ jitsi_user }}"
|
||||
|
||||
- name: Deploy new jitsi meet version
|
||||
shell: |
|
||||
rm -rf {{ jitsi_root_dir }}/meet/*
|
||||
@@ -193,8 +223,11 @@
|
||||
cp -r *.js *.html resources/*.txt connection_optimization favicon.ico fonts images libs static sounds LICENSE lang {{ jitsi_root_dir }}/meet/
|
||||
cp css/all.css {{ jitsi_root_dir }}/meet/css/
|
||||
args:
|
||||
chdir: "{{ jitsi_root_dir }}/src/meet"
|
||||
when: (jitsi_meet_git.changed and jitsi_manage_upgrade) or not jitsi_meet_index.stat.exists
|
||||
chdir: "{{ jitsi_root_dir }}/tmp/jitsi-meet-stable-jitsi-meet_{{ jitsi_version }}"
|
||||
|
||||
- name: Write installed version
|
||||
copy: content={{ jitsi_version }} dest={{ jitsi_root_dir }}/meta/ansible_meet_version
|
||||
|
||||
tags: jitsi
|
||||
|
||||
- name: Update languages
|
||||
@@ -214,12 +247,3 @@
|
||||
notify: restart jitsi-confmapper
|
||||
tags: jitsi
|
||||
|
||||
- name: Ensure prosody module dir exists
|
||||
file: path=/opt/prosody/modules/ state=directory
|
||||
tags: jitsi
|
||||
|
||||
- name: Install bypass_pwd module for prosody
|
||||
template: src=mod_jibri_bypass_pwd.lua.j2 dest=/opt/prosody/modules/mod_jibri_bypass_pwd.lua
|
||||
notify: reload prosody
|
||||
tags: jitsi
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
---
|
||||
|
||||
- name: Start and enable services
|
||||
service: name=jitsi-jicofo state=started enabled=True
|
||||
service: name=jitsi-jicofo state=started enabled=true
|
||||
tags: jitsi
|
||||
|
||||
- name: Start and enable jigasi
|
||||
@@ -11,3 +11,7 @@
|
||||
- name: Start and enable confmapper
|
||||
service: name=jitsi-confmapper state={{ jitsi_jigasi | ternary('started', 'stopped') }} enabled={{ jitsi_jigasi }}
|
||||
tags: jitsi
|
||||
|
||||
- name: Start and enable excalidraw
|
||||
service: name=jitsi-excalidraw state=started enabled=true
|
||||
tags: jitsi
|
||||
|
Reference in New Issue
Block a user