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 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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: Install Jitsi LDAP dependencies
  70. apt:
  71. name: "{{ packages }}"
  72. state: present
  73. update_cache: yes
  74. vars:
  75. packages:
  76. - prosody-modules
  77. - lua-ldap
  78. tags:
  79. - dependencies
  80. when: jitsi_enable_ldap
  81. notify: restart jitsi
  82. - name: Create the Jitsi Prosody Config
  83. template:
  84. src=etc_prosody_conf.avail_jitsi_domain.cfg.lua.j2
  85. dest=/etc/prosody/conf.avail/{{ jitsi_domain }}.cfg.lua
  86. owner=root
  87. group=root
  88. notify: restart jitsi
  89. - name: Create the Jitsi Config
  90. template:
  91. src=etc_jitsi_meet_jitsi_domain-config.js.j2
  92. dest=/etc/jitsi/meet/{{ jitsi_domain }}-config.js
  93. owner=root
  94. group=root
  95. notify: restart jitsi
  96. - name: Create the Jicofo Config
  97. template:
  98. src=etc_jitsi_jicofo_sip-communicator.properties.j2
  99. dest=/etc/jitsi/jicofo/sip-communicator.properties
  100. owner=root
  101. group=root
  102. notify: restart jitsi
  103. - name: Enable Apache include module
  104. command: a2enmod include creates=/etc/apache2/mods-enabled/include.load
  105. notify: restart apache
  106. - name: Create the Apache Jitsi sites config files
  107. template:
  108. src=etc_apache2_sites-available_jitsi.j2
  109. dest=/etc/apache2/sites-available/jitsi_{{ item.name }}.conf
  110. owner=root
  111. group=root
  112. with_items: "{{ virtual_domains }}"
  113. notify: restart apache
  114. - name: Enable Apache sites (creates new sites-enabled symlinks)
  115. command: a2ensite jitsi_{{ item }}.conf creates=/etc/apache2/sites-enabled/jitsi_{{ item }}.conf
  116. notify: restart apache
  117. with_items: "{{ virtual_domains | json_query('[*].name') }}"
  118. - name: Create Jitsi accounts
  119. command: prosodyctl register {{ item.name }} {{ jitsi_domain }} {{ item.password }}
  120. with_items: "{{ jitsi_accounts }}"
  121. ignore_errors: True
  122. when: not jitsi_enable_ldap