Update Install_recording.yml
This commit is contained in:
@@ -9,19 +9,19 @@
|
|||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
- name: Download en extract Firefox naar /opt
|
- name: Download Firefox
|
||||||
ansible.builtin.command:
|
ansible.builtin.get_url:
|
||||||
cmd: 'wget -O firefox.tar.xz https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US'
|
url: "https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US"
|
||||||
chdir: /opt
|
dest: /opt/firefox.tar.xz
|
||||||
args:
|
mode: '0644'
|
||||||
creates: /opt/firefox
|
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Extract Firefox
|
- name: Extract Firefox
|
||||||
unarchive:
|
ansible.builtin.unarchive:
|
||||||
src: /opt/firefox.tar.xz
|
src: /opt/firefox.tar.xz
|
||||||
dest: /opt
|
dest: /opt
|
||||||
remote_src: yes
|
remote_src: yes
|
||||||
|
become: yes
|
||||||
|
|
||||||
- name: Maak een symlink voor Firefox
|
- name: Maak een symlink voor Firefox
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
@@ -30,74 +30,52 @@
|
|||||||
state: link
|
state: link
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Installeer benodigde GTK bibliotheken
|
- name: Installeer benodigde pakketten
|
||||||
apt:
|
ansible.builtin.apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
name:
|
name:
|
||||||
- libgtk-3-0
|
- libgtk-3-0
|
||||||
- libdbus-glib-1-2
|
- libdbus-glib-1-2
|
||||||
|
- libpulse0
|
||||||
|
- pulseaudio
|
||||||
|
- xvfb
|
||||||
|
- ffmpeg
|
||||||
|
- python3.10-venv
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Download en extract Geckodriver naar /usr/local/bin
|
- name: Download Geckodriver
|
||||||
ansible.builtin.command:
|
ansible.builtin.get_url:
|
||||||
cmd: 'wget https://github.com/mozilla/geckodriver/releases/download/v0.36.0/geckodriver-v0.36.0-linux64.tar.gz'
|
url: "https://github.com/mozilla/geckodriver/releases/download/v0.36.0/geckodriver-v0.36.0-linux64.tar.gz"
|
||||||
chdir: /usr/local/bin
|
dest: /tmp/geckodriver.tar.gz
|
||||||
args:
|
mode: '0644'
|
||||||
creates: /usr/local/bin/geckodriver
|
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Extract Geckodriver
|
- name: Extract Geckodriver
|
||||||
unarchive:
|
ansible.builtin.unarchive:
|
||||||
src: /usr/local/bin/geckodriver-v0.36.0-linux64.tar.gz
|
src: /tmp/geckodriver.tar.gz
|
||||||
dest: /usr/local/bin
|
dest: /usr/local/bin
|
||||||
remote_src: yes
|
remote_src: yes
|
||||||
|
become: yes
|
||||||
|
|
||||||
- name: Maak Geckodriver executable
|
- name: Maak Geckodriver executable
|
||||||
file:
|
ansible.builtin.file:
|
||||||
path: /usr/local/bin/geckodriver
|
path: /usr/local/bin/geckodriver
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Verwijder Geckodriver tar.gz
|
- name: Verwijder Geckodriver tar.gz
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: /usr/local/bin/geckodriver-v0.36.0-linux64.tar.gz
|
path: /tmp/geckodriver.tar.gz
|
||||||
state: absent
|
state: absent
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Installeer python3.10-venv
|
|
||||||
apt:
|
|
||||||
update_cache: yes
|
|
||||||
name: python3.10-venv
|
|
||||||
become: yes
|
|
||||||
|
|
||||||
- name: Installeer libpulse0
|
|
||||||
apt:
|
|
||||||
update_cache: yes
|
|
||||||
name: libpulse0
|
|
||||||
become: yes
|
|
||||||
|
|
||||||
- name: Installeer pulseaudio
|
|
||||||
apt:
|
|
||||||
update_cache: yes
|
|
||||||
name: pulseaudio
|
|
||||||
become: yes
|
|
||||||
|
|
||||||
- name: Installeer xvfb
|
|
||||||
apt:
|
|
||||||
update_cache: yes
|
|
||||||
name: xvfb
|
|
||||||
become: yes
|
|
||||||
|
|
||||||
- name: Installeer ffmpeg
|
|
||||||
apt:
|
|
||||||
update_cache: yes
|
|
||||||
name: ffmpeg
|
|
||||||
become: yes
|
|
||||||
|
|
||||||
- name: Maak de map recording aan
|
- name: Maak de map recording aan
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: /home/ubuntu/recording
|
path: /home/ubuntu/recording
|
||||||
state: directory
|
state: directory
|
||||||
|
mode: '0755'
|
||||||
|
owner: ubuntu
|
||||||
|
group: ubuntu
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Clone nextcloud-talk-recording repository
|
- name: Clone nextcloud-talk-recording repository
|
||||||
@@ -106,18 +84,17 @@
|
|||||||
dest: /home/ubuntu/recording/nextcloud-talk-recording
|
dest: /home/ubuntu/recording/nextcloud-talk-recording
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Installeer een virtuele omgeving in map recording
|
- name: Maak virtuele omgeving in recording-map
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
cmd: python3 -m venv venv
|
cmd: python3 -m venv venv
|
||||||
chdir: /home/ubuntu/recording
|
chdir: /home/ubuntu/recording
|
||||||
|
creates: /home/ubuntu/recording/venv
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Activeer de virtuele omgeving en installeer nextcloud-talk-recording
|
- name: Installeer nextcloud-talk-recording in virtualenv
|
||||||
ansible.builtin.shell: |
|
ansible.builtin.pip:
|
||||||
source /home/ubuntu/recording/venv/bin/activate
|
name: file:///home/ubuntu/recording/nextcloud-talk-recording
|
||||||
pip install file:///home/ubuntu/recording/nextcloud-talk-recording
|
virtualenv: /home/ubuntu/recording/venv
|
||||||
args:
|
|
||||||
executable: /bin/bash
|
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Maak de server.conf aan
|
- name: Maak de server.conf aan
|
||||||
@@ -154,8 +131,12 @@
|
|||||||
browser = firefox
|
browser = firefox
|
||||||
[stats]
|
[stats]
|
||||||
allowed_ips =
|
allowed_ips =
|
||||||
|
owner: ubuntu
|
||||||
|
group: ubuntu
|
||||||
|
mode: '0644'
|
||||||
|
become: yes
|
||||||
|
|
||||||
- name: Laat de service altijd draaien
|
- name: Start recording via nohup
|
||||||
ansible.builtin.shell: |
|
ansible.builtin.shell: |
|
||||||
source /home/ubuntu/recording/venv/bin/activate
|
source /home/ubuntu/recording/venv/bin/activate
|
||||||
nohup python3 -m nextcloud.talk.recording > /home/ubuntu/recording/output.log 2>&1 &
|
nohup python3 -m nextcloud.talk.recording > /home/ubuntu/recording/output.log 2>&1 &
|
||||||
|
|||||||
Reference in New Issue
Block a user