Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable change of jitsi_meet_authentication #12

Merged
merged 2 commits into from
Apr 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tasks/jicofo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,11 @@
line: ".level={{ jitsi_meet_jicofo_loglevel }}"
state: present
notify: restart jicofo

- name: jicofo sip-communicator properties
become: yes
template:
src: "{{ jitsi_meet_jigasi_jicofo_sip_template }}"
dest: /etc/jitsi/jicofo/sip-communicator.properties
mode: 0644
notify: restart jicofo
4 changes: 3 additions & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

- include: jicofo.yml

- include: prosody.yml

- include: sip_gateway.yml
when: jitsi_meet_configure_sip_gateway | bool

Expand All @@ -33,4 +35,4 @@
# Placing the browser extensions last so the associated debugging tasks
# that display URLs are visible near the end of the play.
# Build your own with https://github.com/jitsi/jidesha
- include: browser_extensions.yml
- include: browser_extensions.yml
18 changes: 18 additions & 0 deletions tasks/prosody.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
- name: set prosody authentification
replace:
path: "/etc/prosody/conf.avail/{{ jitsi_meet_server_name }}.cfg.lua"
regexp: "(VirtualHost \"{{ jitsi_meet_server_name }}\"\n *--.*\n *)authentication = .*\n"
replace: "\\1authentication = \"{{ jitsi_meet_authentication }}\"\n"
tags: jitsi-prosody
notify: restart prosody
- name: set guest vhost
blockinfile:
path: "/etc/prosody/conf.avail/{{ jitsi_meet_server_name }}.cfg.lua"
insertbefore: "Component \"focus.{{ jitsi_meet_server_name }}\""
marker: "-- Ansible managed block {mark}"
block: |
VirtualHost "guest.{{ jitsi_meet_server_name }}"
authentication = "anonymous"
c2s_require_encryption = false
tags: jitsi-prosody
notify: restart prosody
9 changes: 1 addition & 8 deletions tasks/sip_gateway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,10 @@
value: "{{ jitsi_meet_jigasi_password }}"
vtype: string

- name: jicofo sip-communicator properties
become: yes
template:
src: "{{ jitsi_meet_jigasi_jicofo_sip_template }}"
dest: /etc/jitsi/jicofo/sip-communicator.properties
mode: 0644
notify: restart jicofo

- name: Add videobridge sip-communicator config
template:
src: "{{ jitsi_meet_jigasi_videobridge_sip_template }}"
dest: /etc/jitsi/videobridge/sip-communicator.properties
mode: 0644
notify: restart jitsi-videobridge
notify: restart jitsi-videobridge
3 changes: 3 additions & 0 deletions templates/jicofo_sip-communicator.properties.j2
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
[email protected].{{ jitsi_meet_server_name }}
org.jitsi.jicofo.ALWAYS_TRUST_MODE_ENABLED=true
{% if jitsi_meet_authentication != 'anonymous' %}
org.jitsi.jicofo.auth.URL=XMPP:{{ jitsi_meet_server_name }}
{% endif %}
5 changes: 3 additions & 2 deletions templates/jitsi_meet_config.js.j2
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ var config = {
domain: '{{ jitsi_meet_server_name }}',

// XMPP MUC domain. FIXME: use XEP-0030 to discover it.
muc: 'conference.{{ jitsi_meet_server_name }}'
muc: 'conference.{{ jitsi_meet_server_name }}',

// When using authentication, domain for guest users.
// anonymousdomain: 'guest.example.com',

{% if jitsi_meet_authentication == 'anonymous' %}// {% endif %}anonymousdomain: 'guest.{{ jitsi_meet_server_name }}',

// Domain for authenticated users. Defaults to <domain>.
// authdomain: '{{ jitsi_meet_server_name }}',
Expand Down