Update Install_recording.yml
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
- name: Playbook om Firefox, Geckodriver en andere tools te installeren
|
- name: Playbook om Firefox, Geckodriver en andere tools te installeren
|
||||||
hosts: localhost
|
hosts: localhost
|
||||||
become: yes
|
become: true
|
||||||
vars:
|
vars:
|
||||||
nextcloud_domain: "{{ nextcloud_domain }}"
|
nextcloud_domain: "{{ nextcloud_domain }}"
|
||||||
nextcloud_secret: "{{ nextcloud_secret }}"
|
nextcloud_secret: "{{ nextcloud_secret }}"
|
||||||
@@ -14,25 +14,22 @@
|
|||||||
url: "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"
|
||||||
dest: /opt/firefox.tar.xz
|
dest: /opt/firefox.tar.xz
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
become: yes
|
|
||||||
|
|
||||||
- name: Extract Firefox
|
- name: Extract Firefox
|
||||||
ansible.builtin.unarchive:
|
ansible.builtin.unarchive:
|
||||||
src: /opt/firefox.tar.xz
|
src: /opt/firefox.tar.xz
|
||||||
dest: /opt
|
dest: /opt
|
||||||
remote_src: yes
|
remote_src: true
|
||||||
become: yes
|
|
||||||
|
|
||||||
- name: Maak een symlink voor Firefox
|
- name: Maak een symlink voor Firefox
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
src: /opt/firefox/firefox
|
src: /opt/firefox/firefox
|
||||||
dest: /usr/local/bin/firefox
|
dest: /usr/local/bin/firefox
|
||||||
state: link
|
state: link
|
||||||
become: yes
|
|
||||||
|
|
||||||
- name: Installeer benodigde pakketten
|
- name: Installeer benodigde pakketten
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
update_cache: yes
|
update_cache: true
|
||||||
name:
|
name:
|
||||||
- libgtk-3-0
|
- libgtk-3-0
|
||||||
- libdbus-glib-1-2
|
- libdbus-glib-1-2
|
||||||
@@ -41,33 +38,28 @@
|
|||||||
- xvfb
|
- xvfb
|
||||||
- ffmpeg
|
- ffmpeg
|
||||||
- python3.10-venv
|
- python3.10-venv
|
||||||
become: yes
|
|
||||||
|
|
||||||
- name: Download Geckodriver
|
- name: Download Geckodriver
|
||||||
ansible.builtin.get_url:
|
ansible.builtin.get_url:
|
||||||
url: "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"
|
||||||
dest: /tmp/geckodriver.tar.gz
|
dest: /tmp/geckodriver.tar.gz
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
become: yes
|
|
||||||
|
|
||||||
- name: Extract Geckodriver
|
- name: Extract Geckodriver
|
||||||
ansible.builtin.unarchive:
|
ansible.builtin.unarchive:
|
||||||
src: /tmp/geckodriver.tar.gz
|
src: /tmp/geckodriver.tar.gz
|
||||||
dest: /usr/local/bin
|
dest: /usr/local/bin
|
||||||
remote_src: yes
|
remote_src: true
|
||||||
become: yes
|
|
||||||
|
|
||||||
- name: Maak Geckodriver executable
|
- name: Maak Geckodriver executable
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: /usr/local/bin/geckodriver
|
path: /usr/local/bin/geckodriver
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
become: yes
|
|
||||||
|
|
||||||
- name: Verwijder Geckodriver tar.gz
|
- name: Verwijder Geckodriver tar.gz
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: /tmp/geckodriver.tar.gz
|
path: /tmp/geckodriver.tar.gz
|
||||||
state: absent
|
state: absent
|
||||||
become: yes
|
|
||||||
|
|
||||||
- name: Maak de map recording aan
|
- name: Maak de map recording aan
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
@@ -76,31 +68,32 @@
|
|||||||
mode: '0755'
|
mode: '0755'
|
||||||
owner: ubuntu
|
owner: ubuntu
|
||||||
group: ubuntu
|
group: ubuntu
|
||||||
become: yes
|
|
||||||
|
|
||||||
- name: Clone nextcloud-talk-recording repository
|
- name: Clone nextcloud-talk-recording repository
|
||||||
ansible.builtin.git:
|
ansible.builtin.git:
|
||||||
repo: https://github.com/nextcloud/nextcloud-talk-recording.git
|
repo: https://github.com/nextcloud/nextcloud-talk-recording.git
|
||||||
dest: /home/ubuntu/recording/nextcloud-talk-recording
|
dest: /home/ubuntu/recording/nextcloud-talk-recording
|
||||||
become: yes
|
|
||||||
|
|
||||||
- name: Maak virtuele omgeving in recording-map
|
- 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
|
creates: /home/ubuntu/recording/venv
|
||||||
become: yes
|
|
||||||
|
|
||||||
- name: Installeer nextcloud-talk-recording in virtualenv
|
- name: Installeer nextcloud-talk-recording in virtualenv
|
||||||
ansible.builtin.pip:
|
ansible.builtin.pip:
|
||||||
name: file:///home/ubuntu/recording/nextcloud-talk-recording
|
name: file:///home/ubuntu/recording/nextcloud-talk-recording
|
||||||
virtualenv: /home/ubuntu/recording/venv
|
virtualenv: /home/ubuntu/recording/venv
|
||||||
become: yes
|
|
||||||
|
|
||||||
- name: Maak de server.conf aan
|
- name: Maak een lege server.conf aan (of wis bestaande inhoud)
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
|
content: ''
|
||||||
dest: /home/ubuntu/recording/server.conf
|
dest: /home/ubuntu/recording/server.conf
|
||||||
content: |
|
|
||||||
|
- name: Voeg inhoud toe aan server.conf
|
||||||
|
ansible.builtin.blockinfile:
|
||||||
|
path: /home/ubuntu/recording/server.conf
|
||||||
|
block: |
|
||||||
[logs]
|
[logs]
|
||||||
level = 20
|
level = 20
|
||||||
[http]
|
[http]
|
||||||
@@ -131,10 +124,6 @@
|
|||||||
browser = firefox
|
browser = firefox
|
||||||
[stats]
|
[stats]
|
||||||
allowed_ips =
|
allowed_ips =
|
||||||
owner: ubuntu
|
|
||||||
group: ubuntu
|
|
||||||
mode: '0644'
|
|
||||||
become: yes
|
|
||||||
|
|
||||||
- name: Start recording via nohup
|
- name: Start recording via nohup
|
||||||
ansible.builtin.shell: |
|
ansible.builtin.shell: |
|
||||||
@@ -142,4 +131,3 @@
|
|||||||
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 &
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
become: yes
|
|
||||||
|
|||||||
Reference in New Issue
Block a user