summaryrefslogtreecommitdiffstats
path: root/roles/prerec/tasks/main.yml
blob: 5b399778c323a681cdc6bbef26cd31439b915dd9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
- name: Ensure the directory exists
  file:
    path: "{{ emacsconf_caption_dir }}/{{ item }}"
    state: directory
    owner: "{{ emacsconf_user }}"
    group: "{{ emacsconf_group }}"
  loop:
    - scripts
    - cache
    - files
- name: Create the symlinks
  file:
    src: "{{ emacsconf_caption_dir }}/{{ item }}"
    dest: "/home/{{ emacsconf_user }}/{{ item }}"
    owner: "{{ emacsconf_user }}"
    group: "{{ emacsconf_group }}"
    state: link
  loop:
    - scripts
    - cache
    - files
- name: Create the symlinks
  file:
    src: "{{ emacsconf_caption_dir }}"
    dest: "/home/{{ emacsconf_user }}/current"
    owner: "{{ emacsconf_user }}"
    group: "{{ emacsconf_group }}"
    state: link
- name: Add it to the path
  lineinfile:
    line: export PATH=~/scripts:$PATH
    path: /home/{{ emacsconf_user }}/.bashrc
    owner: "{{ emacsconf_user }}"
    group: "{{ emacsconf_group }}"
- name: Recreate encoding script and backup old one
  tags: process-prerec, prerec-scripts
  template:
    src: "reencode.sh"
    dest: "{{ emacsconf_caption_dir }}/scripts/reencode.sh"
    owner: "{{ emacsconf_user }}"
    group: "{{ emacsconf_group }}"
    backup: yes
    mode: 0775
- name: Get UIDs
  tags: process-prerec, prerec-scripts
  getent:
    database: passwd
- name: Copy scripts for processing
  tags: process-prerec, prerec-scripts
  template:
    src: "{{ item }}"
    dest: "/usr/local/bin/{{ item }}"
    owner: "{{ emacsconf_user }}"
    group: "{{ emacsconf_group }}"
    mode: 0775
  loop:
    - process-prerec.sh
    - talk
    - upload.sh
    - publish-backstage-index.sh
    - update-emacsconf.sh
    - thumbnail.sh
    - reencode.sh
    - run-aeneas.sh
    - rename-original.sh
    - copy-original.sh
    - mux-subs.sh
    - verify-main.sh
    - remux.sh
    - get-file-prefix
- name: Copy Makefile
  template:
    src: Makefile
    dest: "{{ emacsconf_caption_dir }}/cache/Makefile"
    owner: "{{ emacsconf_user }}"
    group: "{{ emacsconf_group }}"