summaryrefslogblamecommitdiffstats
path: root/roles/obs/tasks/obs-setup.yml
blob: 5b0fba4326add710bde5727613402e1c2db0b89f (plain) (tree)
1
2
3
4
5
6
7
8
9

                                  
                                                                 

                                  
                    

                                  
                                                                                      



                                  
                                  




                                                               


                            

                                  
                                                                                                
              
                          
                 

                    

                                  
                                                                                         
                                       
                 




                                           
              
                                       
                 




                                           
              

                                         
               

                                  
                                                    


              

                      
                                     
                         
           

                                                  


                                  




                    







                                  
- name: Create OBS scene directory
  file:
    path: "~{{ emacsconf_user }}/.config/obs-studio/basic/scenes"
    owner: "{{ emacsconf_user }}"
    group: "{{ emacsconf_group }}"
    state: directory
- name: Create profile directories
  file: 
    path: "~{{ emacsconf_user }}/.config/obs-studio/basic/profiles/{{ emacsconf_id }}"
    state: directory
    owner: "{{ emacsconf_user }}"
    group: "{{ emacsconf_group }}"
    mode: 0775
- name: Install OBS global profile
  template:
    src: global.ini
    owner: "{{ emacsconf_user }}"
    group: "{{ emacsconf_group }}"
    dest: "~{{ emacsconf_user }}/.config/obs-studio/global.ini"
- name: Install OBS profiles
  template:
    src: profile.ini
    owner: "{{ emacsconf_user }}"
    group: "{{ emacsconf_group }}"
    dest: "~{{ emacsconf_user }}/.config/obs-studio/basic/profiles/{{ emacsconf_id }}/basic.ini"
    mode: 0664
- name: Install OBS scenes
  tags: obs-scene
  template:
    src: scenes.json
    owner: "{{ emacsconf_user }}"
    group: "{{ emacsconf_group }}"
    dest: "~{{ emacsconf_user }}/.config/obs-studio/basic/scenes/{{ emacsconf_id }}.json"
- name: Copy overlay template for video
  tags: obs-scene
  copy:
    src: overlay.svg
    dest: "~{{ emacsconf_user }}/video.svg"
    owner: "{{ emacsconf_user }}"
    group: "{{ emacsconf_group }}"
    mode: 0664
- name: Copy overlay template for video
  tags: obs-scene
  copy:
    src: overlay.svg
    dest: "~{{ emacsconf_user }}/other.svg"
    owner: "{{ emacsconf_user }}"
    group: "{{ emacsconf_group }}"
    mode: 0664
- name: Create text files for OBS sources
  copy:
    content: ""
    owner: "{{ emacsconf_user }}"
    group: "{{ emacsconf_group }}"
    dest: "~{{ emacsconf_user }}/{{ filename }}.txt"
    mode: 0664
  loop:
    - news
  loop_control:
    loop_var: filename
- name: Create OBS scripts for tracks
  tags: obs-track-scripts
  template:
    src: "{{ script }}"
    dest: "~{{ emacsconf_user }}/bin/{{ script }}"
    owner: "{{ emacsconf_user }}"
    group: "{{ emacsconf_group }}"
    mode: 0775
  loop_control:
    loop_var: script
  loop:
    - obs-track
    - obs-cli-track
- name: Fix permissions
  become: true
  become_user: root
  file:
    path: "~{{ emacsconf_user }}"
    owner: "{{ emacsconf_user }}"
    group: "{{ emacsconf_group }}"
    recurse: true