[Jitsi] Add Jitsi role
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>certbot_on_virtu
parent
d9486290c2
commit
3deae233b1
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
# We use embedded Jitsi configuration
|
||||
loc_nginx:
|
||||
servers: []
|
||||
|
||||
glob_jitsi:
|
||||
ip: "{{ query('ldap', 'ip', ansible_hostname, 'srv') }}"
|
||||
hostname: "{{ ansible_hostname }}.crans.org"
|
|
@ -6,6 +6,6 @@
|
|||
nginx: '{{ glob_nginx | default({}) | combine(loc_nginx | default({})) }}'
|
||||
jitsi: '{{ glob_jitsi | default({}) | combine(loc_jitsi | default({})) }}'
|
||||
roles:
|
||||
- jitsi
|
||||
- certbot
|
||||
- nginx
|
||||
- jitsi
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
---
|
||||
- name: Install basic Jitsi dependencies
|
||||
apt:
|
||||
update_cache: true
|
||||
install_recommends: false
|
||||
name:
|
||||
- apt-transport-https
|
||||
- gnupg2
|
||||
- nginx
|
||||
- sudo
|
||||
register: apt_result
|
||||
retries: 3
|
||||
until: apt_result is succeeded
|
||||
|
||||
- name: Define host
|
||||
lineinfile:
|
||||
path: /etc/hosts
|
||||
regexp: "^{{ item }}"
|
||||
line: '{{ item }} {{ jitsi.hostname }}'
|
||||
loop: "{{ jitsi.ip }}"
|
||||
|
||||
- name: Import public key of Jitsi repository
|
||||
apt_key:
|
||||
url: https://download.jitsi.org/jitsi-key.gpg.key
|
||||
|
||||
- name: Configure Jitsi repository
|
||||
template:
|
||||
src: apt/sources.list.d/jitsi.list.j2
|
||||
dest: /etc/apt/sources.list.d/jitsi.list
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: root
|
||||
|
||||
- name: Configure debian questions
|
||||
debconf:
|
||||
name: "{{ item.name }}"
|
||||
question: "{{ item.question }}"
|
||||
value: "{{ item.value }}"
|
||||
vtype: "{{ item.vtype }}"
|
||||
loop:
|
||||
- name: jitsi-meet-prosody
|
||||
question: jitsi-videobridge/jvb-hostname
|
||||
value: "{{ jitsi.hostname }}"
|
||||
vtype: "string"
|
||||
- name: jitsi-meet-web-config
|
||||
question: jitsi-meet/cert-choice
|
||||
value: "I want to use my own certificate"
|
||||
vtype: "select"
|
||||
- name: jitsi-meet-web-config
|
||||
question: jitsi-meet/cert-path-crt
|
||||
value: "/etc/letsencrypt/live/{{ certbot[0].certname }}/fullchain.pem"
|
||||
vtype: "string"
|
||||
- name: jitsi-meet-web-config
|
||||
question: jitsi-meet/cert-path-key
|
||||
value: "/etc/letsencrypt/live/{{ certbot[0].certname }}/privkey.pem"
|
||||
vtype: "string"
|
||||
|
||||
- name: Install Jitsi-meet
|
||||
apt:
|
||||
update_cache: true
|
||||
install_recommends: false
|
||||
name:
|
||||
- jitsi-meet
|
||||
register: apt_result
|
||||
retries: 3
|
||||
until: apt_result is succeeded
|
||||
|
||||
- name: Apply Jitsi configuration
|
||||
lineinfile:
|
||||
path: "/etc/jitsi/meet/{{ jitsi.hostname }}-config.js"
|
||||
regexp: "{{ item }}"
|
||||
line: " {{ item }}: true,"
|
||||
loop:
|
||||
- "liveStreamingEnabled"
|
||||
- "prejoinPageEnabled"
|
||||
|
||||
- name: Indicate role in motd
|
||||
template:
|
||||
src: update-motd.d/05-service.j2
|
||||
dest: /etc/update-motd.d/05-jitsi
|
||||
mode: 0755
|
|
@ -0,0 +1,3 @@
|
|||
{{ ansible_header | comment }}
|
||||
|
||||
deb https://download.jitsi.org stable/
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/tail +14
|
||||
{{ ansible_header | comment }}
|
||||
[0m> [38;5;82mJitsi[0m a été déployé sur cette machine. Voir [38;5;6m/etc/jitsi/[0m.
|
Loading…
Reference in New Issue