summaryrefslogtreecommitdiffstats
path: root/roles/caption/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/caption/tasks/main.yml')
-rw-r--r--roles/caption/tasks/main.yml60
1 files changed, 50 insertions, 10 deletions
diff --git a/roles/caption/tasks/main.yml b/roles/caption/tasks/main.yml
index 6396339..7fe1570 100644
--- a/roles/caption/tasks/main.yml
+++ b/roles/caption/tasks/main.yml
@@ -5,10 +5,11 @@
- ffmpeg
- cmake
- jq
+ - inotify-tools
- name: Install whisper
ansible.builtin.pip:
name: git+https://github.com/openai/whisper.git
-- name: Install lhotse
+- name: Install Python packages
ansible.builtin.pip:
name:
- lhotse
@@ -16,18 +17,57 @@
- tqdm
- torchaudio
- num2words
-- name: Copy the shell script
- tags: process-captions
+- name: Create group
+ group:
+ name: "{{ emacsconf_group }}"
+ state: present
+- name: Create user
+ user:
+ name: "{{ emacsconf_user }}"
+ group: "{{ emacsconf_group }}"
+ state: present
+- name: Ensure the directory exists
+ file:
+ path: "{{ emacsconf_caption_dir }}"
+ state: directory
+- name: Copy the script for processing the files
+ tags: process-captions, wip
template:
src: process-captions.py
- dest: /data/emacsconf/{{ emacsconf_year }}/process-captions.py
- mode: 0755
- owner: sachac
- group: org
+ dest: "{{ emacsconf_caption_dir }}/process-captions.py"
+ mode: 0775
+- name: Copy the inotify script
+ tags: process-captions
+ template:
+ src: inotify-process-captions.sh
+ dest: "{{ emacsconf_caption_dir }}/inotify-process-captions.sh"
+ mode: 0775
- name: Copy talks.json
tags: talks-json
template:
src: talks.json
- dest: /data/emacsconf/{{ emacsconf_year }}/talks.json
- owner: sachac
- group: org
+ dest: "{{ emacsconf_caption_dir }}/talks.json"
+ mode: 0664
+- name: Install init.d configuration
+ tags: system
+ become: true
+ template:
+ src: captions.init.d
+ dest: /etc/init.d/captions
+ owner: root
+ group: root
+ mode: 0755
+- name: Change the group for all the files
+ tags: wip
+ file:
+ dest: "{{ emacsconf_caption_dir }}"
+ group: "{{ emacsconf_group }}"
+ mode: "g+rwX"
+ recurse: true
+- name: Restart caption monitoring service
+ become: true
+ tags: wip
+ service:
+ name: captions
+ enabled: true
+ state: started