summaryrefslogblamecommitdiffstats
path: root/roles/prerec/tasks/main.yml
blob: 5b399778c323a681cdc6bbef26cd31439b915dd9 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11

                                   
                                                  


                                  




                           
       












                                                 








                                            
                                                   
                                      




                                                           
               
              



                                      
                                   
                                      

                     
                                     




                                  
          
               
                                
                         
                  
                 
                   
                        
                      


                    
                     






                                                      
- 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 }}"