Update to 2021-12-01 19:13

This commit is contained in:
Daniel Berteaud
2021-12-01 19:13:34 +01:00
commit 4c4556c660
2153 changed files with 60999 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
---
- name: Remove temp files
file: path={{ item }} state=absent
loop:
- "{{ jitsi_root_dir }}/tmp/jitsi-videobridge-2.1-SNAPSHOT"
- "{{ jitsi_root_dir }}/src/videobridge/target"
tags: jitsi

View File

@@ -0,0 +1,9 @@
---
- name: Deploy videobridge configuration
template: src={{ item }}.j2 dest={{ jitsi_root_dir }}/etc/videobridge/{{ item }} group={{ jitsi_user }} mode=640
loop:
- videobridge.conf
- sip-communicator.properties
notify: restart jitsi-videobridge
tags: jitsi

View File

@@ -0,0 +1,3 @@
---
- include: ../jitsi/tasks/directories.yml

View File

@@ -0,0 +1,15 @@
---
- name: Generate a random pass for videobridge
block:
- import_tasks: ../includes/get_rand_pass.yml
vars:
- pass_file: "{{ jitsi_root_dir }}/meta/ansible_videobridge_xmpp_pass"
- set_fact: jitsi_videobridge_xmpp_pass={{ rand_pass }}
when: jitsi_videobridge_xmpp_pass is not defined
tags: jitsi
- name: Check if videobridge is built
stat: path={{ jitsi_root_dir }}/videobridge/jvb.sh
register: jitsi_videobridge_script
tags: jitsi

View File

@@ -0,0 +1,52 @@
---
- name: Install dependencies
yum:
name:
- java-1.8.0-openjdk
- git
tags: jitsi
# If the repo changed since the last run, we rebuild and restart the bridge
- name: Clone videobridge repo
git:
repo: "{{ jitsi_videobridge_git_url }}"
dest: "{{ jitsi_root_dir }}/src/videobridge"
force: True
become_user: "{{ jitsi_user }}"
register: jitsi_videobridge_git
tags: jitsi
- name: Install or update videobridge
block:
- name: Build videobridge
command: /opt/maven/apache-maven/bin/mvn package -DskipTests -Dassembly.skipAssembly=false
args:
chdir: "{{ jitsi_root_dir }}/src/videobridge"
become_user: "{{ jitsi_user }}"
- name: Extract videobridge archive
unarchive:
src: "{{ jitsi_root_dir }}/src/videobridge/jvb/target/jitsi-videobridge-2.1-SNAPSHOT-archive.zip"
dest: "{{ jitsi_root_dir }}/tmp/"
remote_src: True
- name: Move videobridge to its final directory
synchronize:
src: "{{ jitsi_root_dir }}/tmp/jitsi-videobridge-2.1-SNAPSHOT/"
dest: "{{ jitsi_root_dir }}/videobridge/"
recursive: True
delete: True
compress: False
delegate_to: "{{ inventory_hostname }}"
notify: restart jitsi-videobridge
when: (jitsi_videobridge_git.changed and jitsi_videobridge_manage_upgrade) or not jitsi_videobridge_script.stat.exists
tags: jitsi
- name: Deploy systemd unit
template: src=jitsi-videobridge.service.j2 dest=/etc/systemd/system/jitsi-videobridge.service
register: jitsi_videobridge_unit
notify: restart jitsi-videobridge
tags: jitsi

View File

@@ -0,0 +1,8 @@
---
- name: Handle jitsi videobridge ports
iptables_raw:
name: jitsi_videobridge_ports
state: "{{ (jitsi_videobridge_src_ip | length > 0) | ternary('present','absent') }}"
rules: "-A INPUT -m state --state NEW -p udp --dport {{ jitsi_videobridge_rtp_port }} -s {{ jitsi_videobridge_src_ip | join(',') }} -j ACCEPT"
tags: firewall,jitsi

View File

@@ -0,0 +1,11 @@
---
- include: user.yml
- include: directories.yml
- include: facts.yml
- include: install.yml
- include: conf.yml
- include: iptables.yml
when: iptables_manage | default(True)
- include: services.yml
- include: cleanup.yml

View File

@@ -0,0 +1,5 @@
---
- name: Start and enable services
service: name=jitsi-videobridge state=started enabled=True
tags: jitsi

View File

@@ -0,0 +1,3 @@
---
- include: ../jitsi/tasks/user.yml