summaryrefslogtreecommitdiffstats
path: root/roles/prerec/tasks/main.yml
blob: e44617da9c511a594f30c657098452ecdab2a5ab (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
- name: Ensure the directory exists
  file:
    path: "{{ emacsconf_caption_dir }}/scripts"
    state: directory
    owner: "{{ emacsconf_user }}"
    group: "{{ emacsconf_group }}"
- name: Create the symlink
  file:
    src: "{{ emacsconf_caption_dir }}/scripts"
    dest: "/home/{{ emacsconf_user }}/scripts"
    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 only if it's not there
  tags: process-prerec
  template:
    src: "reencode.sh"
    dest: "{{ emacsconf_caption_dir }}/scripts/reencode.sh"
    owner: "{{ emacsconf_user }}"
    group: "{{ emacsconf_group }}"
    backup: yes
    mode: 0775
- name: Copy scripts for processing
  tags: process-prerec, wip
  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