diff options
author | Sacha Chua <sacha@sachachua.com> | 2022-10-25 11:13:23 -0400 |
---|---|---|
committer | Sacha Chua <sacha@sachachua.com> | 2022-10-25 11:13:23 -0400 |
commit | e42e761dca58557799084ceafdf2088d85fe40c5 (patch) | |
tree | 7a88d305b303b763b7ad8c849b0902b3068634bd /roles/caption/tasks | |
parent | 765036da2fc05fd45693bec60ce911b01636e9be (diff) | |
download | emacsconf-ansible-e42e761dca58557799084ceafdf2088d85fe40c5.tar.xz emacsconf-ansible-e42e761dca58557799084ceafdf2088d85fe40c5.zip |
Caption daemon
Diffstat (limited to '')
-rw-r--r-- | roles/caption/tasks/main.yml | 60 |
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 |