No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

jitsi.yml 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. - name: Ensure repository key for Jitsi is in place
  2. apt_key: url=https://download.jitsi.org/jitsi-key.gpg.key state=present
  3. tags:
  4. - dependencies
  5. - name: Add Jitsi repository
  6. apt_repository: repo="deb https://download.jitsi.org stable/"
  7. tags:
  8. - dependencies
  9. - name: Set firewall rules for Jitsi TCP
  10. ufw: rule=allow port={{ item }} proto=tcp
  11. with_items:
  12. - 80
  13. - 443
  14. - 22
  15. - 5349
  16. tags: ufw
  17. - name: Set firewall rules for Jitsi UDP
  18. ufw: rule=allow port={{ item }} proto=udp
  19. with_items:
  20. - 10000
  21. - 3478
  22. tags: ufw
  23. - name: Set Jitsi Certificate Selection
  24. debconf:
  25. name: jitsi-meet
  26. question: jitsi-meet/cert-choice
  27. value: I want to use my own certificate
  28. vtype: select
  29. tags:
  30. - dependencies
  31. - name: Set Jitsi Certificate Key
  32. debconf:
  33. name: jitsi-meet
  34. question: jitsi-meet/cert-path-key
  35. value: "/etc/letsencrypt/live/{{ domain }}/privkey.pem"
  36. vtype: string
  37. tags:
  38. - dependencies
  39. - name: Set Jitsi Certificate
  40. debconf:
  41. name: jitsi-meet
  42. question: jitsi-meet/cert-path-crt
  43. value: "/etc/letsencrypt/live/{{ domain }}/fullchain.pem"
  44. vtype: string
  45. tags:
  46. - dependencies
  47. - name: Set Jitsi Hostname
  48. debconf:
  49. name: "{{ item }}"
  50. question: "{{ item }}/jvb-hostname"
  51. value: "{{ jitsi_domain }}"
  52. vtype: string
  53. with_items:
  54. - jitsi-meet
  55. - jitsi-meet-prosody
  56. - jitsi-videobridge
  57. tags:
  58. - dependencies
  59. - name: Install Jitsi and dependencies from official repository
  60. apt:
  61. name: "{{ packages }}"
  62. state: present
  63. update_cache: yes
  64. vars:
  65. packages:
  66. - jitsi-meet
  67. tags:
  68. - dependencies
  69. - name: Create the Jitsi Prosody Config
  70. template:
  71. src=etc_prosody_conf.avail_jitsi_domain.cfg.lua.j2
  72. dest=/etc/prosody/conf.avail/{{ jitsi_domain }}.cfg.lua
  73. owner=root
  74. group=root
  75. notify: restart jitsi
  76. - name: Create the Jitsi Config
  77. template:
  78. src=etc_jitsi_meet_jitsi_domain-config.js.j2
  79. dest=/etc/jitsi/meet/{{ jitsi_domain }}-config.js
  80. owner=root
  81. group=root
  82. notify: restart jitsi
  83. - name: Create the Jicofo Config
  84. template:
  85. src=etc_jitsi_jicofo_sip-communicator.properties.j2
  86. dest=/etc/jitsi/jicofo/sip-communicator.properties
  87. owner=root
  88. group=root
  89. notify: restart jitsi
  90. - name: Create the Apache Jitsi sites config files
  91. template:
  92. src=etc_apache2_sites-available_jitsi.j2
  93. dest=/etc/apache2/sites-available/jitsi_{{ item.name }}.conf
  94. owner=root
  95. group=root
  96. with_items: "{{ virtual_domains }}"
  97. notify: restart apache
  98. - name: Enable Apache sites (creates new sites-enabled symlinks)
  99. command: a2ensite jitsi_{{ item }}.conf creates=/etc/apache2/sites-enabled/jitsi_{{ item }}.conf
  100. notify: restart apache
  101. with_items: "{{ virtual_domains | json_query('[*].name') }}"
  102. - name: Create Jitsi accounts
  103. command: prosodyctl register {{ item.name }} {{ jitsi_domain }} {{ item.password }}
  104. with_items: "{{ jitsi_accounts }}"
  105. ignore_errors: True