Skip to content

Instantly share code, notes, and snippets.

@nbuchwitz
Created March 16, 2020 17:32
Show Gist options
  • Save nbuchwitz/932c7611ada8cb05d9dccc4522d8024c to your computer and use it in GitHub Desktop.
Save nbuchwitz/932c7611ada8cb05d9dccc4522d8024c to your computer and use it in GitHub Desktop.
---
- hosts: jitsi
become: True
vars:
jitsi_domain: "jitsi.example.org"
certbot_mail: "foo@example.org"
pre_tasks:
- name: Enable tls transport for apt
apt:
name: apt-transport-https
tasks:
- name: Import apt repo key
apt_key:
url: https://download.jitsi.org/jitsi-key.gpg.key
- name: Configure jitsi apt repo
apt_repository:
repo: 'deb https://download.jitsi.org stable/'
filename: jitsi-stable
register: jitsi_repo
- name: Reload apt cache
apt:
update_cache: yes
when: jitsi_repo.changed
- name: Set settings for debconf (1/2)
shell: echo 'jitsi-meet-web-config jitsi-videobridge/jvb-hostname string {{ jitsi_domain }}' | debconf-set-selections
- name: Set settings for debconf (2/2)
shell: echo 'jitsi-meet-web-config jitsi-meet/jvb-hostname string {{ jitsi_domain }}' | debconf-set-selections
- name: Install jitsi packages
apt:
name:
- jitsi-meet
- certbot
- name: Monkeypatch the jitsi-letsencrypt script
lineinfile:
regexp: '^read EMAIL$'
line: 'EMAIL={{ certbot_mail}}'
path: /usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh
- name: Run jitsi-letsencrypt script
shell: '/usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment