Initial release
[jitsi-ansible.git] / tasks / main.yml
1 ---
2
3 - name: add jitsi apt key
4   apt_key:
5     data: "{{ lookup('file', 'files/download.jitsi.org.asc') }}"
6     state: present
7
8 - name: add jitsi apt repo
9   apt_repository:
10     repo: deb https://download.jitsi.org stable/
11     state: present
12     update_cache: yes
13     filename: 'jitsi'
14
15 # TODO: 
16 # Automate jitsi apt installation. By now, after running this playbook once you have to run 'apt install jitsi-meet'
17
18 - name: http ports
19   ufw:
20     comment: http ports
21     rule: allow
22     port: "{{ item }}"
23     direction: in
24   with_items:
25     - 80
26     - 443
27
28 - name: check if jitsi is installed
29   stat: path=/usr/share/jitsi-meet
30   register: j
31
32 - name: copy watermark logo
33   copy:
34     src: files/LPlogo.png
35     dest: /usr/share/jitsi-meet/images/watermark.png
36     owner: root
37     group: root
38     mode: 0444
39   when: j.stat.exists
40
41 - name: copy index.html (librejs)
42   copy:
43     src: files/index.html
44     dest: /usr/share/jitsi-meet/index.html
45     owner: root
46     group: root
47     mode: 0444
48   when: j.stat.exists
49
50 - name: custom css
51   lineinfile:
52     path: /usr/share/jitsi-meet/css/all.css
53     line: ".header-text-description, .unsupported-desktop-browser__description {display:none!important}"
54   when: j.stat.exists
55
56 - name: fellow hacker
57   replace:
58     path: /usr/share/jitsi-meet/interface_config.js
59     regexp: "Fellow Jitser"
60     replace: "Fellow Hacker"
61   when: j.stat.exists
62
63 - name: disable youtube button
64   replace:
65     path: /usr/share/jitsi-meet/interface_config.js
66     regexp: "'sharedvideo',"
67     replace: ""
68   when: j.stat.exists
69
70 - name: disable background blur button
71   replace:
72     path: /usr/share/jitsi-meet/interface_config.js
73     regexp: "'videobackgroundblur',"
74     replace: ""
75   when: j.stat.exists
76
77 - name: disable background blur
78   replace:
79     path: /usr/share/jitsi-meet/interface_config.js
80     regexp: "DISABLE_VIDEO_BACKGROUND: false,"
81     replace: "DISABLE_VIDEO_BACKGROUND: true,"
82   when: j.stat.exists
83
84 - name: link
85   replace:
86     path: /usr/share/jitsi-meet/interface_config.js
87     regexp: "https://jitsi.org"
88     replace: "https://libreplanet.org"
89   when: j.stat.exists
90
91 - name: quality icon
92   replace:
93     path: /usr/share/jitsi-meet/interface_config.js
94     regexp: "VIDEO_QUALITY_LABEL_DISABLED: false"
95     replace: "VIDEO_QUALITY_LABEL_DISABLED: true"
96   when: j.stat.exists
97
98 - name: hide toolbar quick
99   replace:
100     path: /usr/share/jitsi-meet/interface_config.js
101     regexp: "TOOLBAR_TIMEOUT: 4000,"
102     replace: "TOOLBAR_TIMEOUT: 1000,"
103   when: j.stat.exists
104
105 - name: hide logo
106   replace:
107     path: /usr/share/jitsi-meet/interface_config.js
108     regexp: "SHOW_WATERMARK_FOR_GUESTS: true,"
109     replace: "SHOW_WATERMARK_FOR_GUESTS: false,"
110   when: j.stat.exists
111
112 - name: hide logo
113   replace:
114     path: /usr/share/jitsi-meet/interface_config.js
115     regexp: "SHOW_JITSI_WATERMARK: true,"
116     replace: "SHOW_JITSI_WATERMARK: false,"
117   when: j.stat.exists
118