summaryrefslogblamecommitdiffstats
path: root/roles/obs/tasks/track.yml
blob: 8b138ae3376da608713e7dbc653d943c60f20da1 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
                
                                                









                                                            
                                     















                                                       
                         












                                                          





                                  






                                                                    























                                                       






                                                    






                                                                


                                      




                                                     







                                                                
                  
                                                




                                              
- name: Set vars
  tags: obs-scene, obs-profile, mpv, wip, mumble
  set_fact:
    old_emacsconf_user: "{{ emacsconf_user }}"
    old_emacsconf_home: "{{ emacsconf_home }}"
    emacsconf_user: "{{ emacsconf_id }}-{{ item.id }}"
    emacsconf_home: "/home/{{ emacsconf_id }}-{{ item.id }}"
- debug:
    var: emacsconf_home
- name: Set up user
  include: user.yml
- name: Set up user-related things
  become_user: "{{ emacsconf_user }}"
  block:
    - name: Set up track bins for addition to paths
      file:
        path: "~{{ emacsconf_user }}/bin/{{ item.id }}"
        owner: "{{ emacsconf_user }}"
        group: "{{ emacsconf_group }}"
        state: directory
    - name: Set up VNC
      include: tigervnc.yml
    - name: Create MPV profile directory
      file:
        path: "~{{ emacsconf_user }}/.config/mpv"
        owner: "{{ emacsconf_user }}"
        group: "{{ emacsconf_group }}"
        state: directory
    - name: Add MPV profile
      tags: mpv-conf, wip
      template:
        src: mpv.conf
        dest: "~{{ emacsconf_user }}/.config/mpv/mpv.conf"
        owner: "{{ emacsconf_user }}"
        group: "{{ emacsconf_group }}"
    - name: Create mpv scripts for tracks
      template:
        src: mpv-track
        dest: "~{{ emacsconf_user }}/bin/track-mpv"
        owner: "{{ emacsconf_user }}"
        group: "{{ emacsconf_group }}"
        mode: 0775
    - name: Set up OBS profiles and scenes
      tags: obs-profile, obs-scene
      include_tasks:
        file: obs-setup.yml
        apply:
          tags:
            - obs-profile
    - name: Add FFMPEG script for streaming
      template:
        src: stream-desktop-with-ffmpeg.sh
        dest: "~{{ emacsconf_user }}/bin/stream-desktop-with-ffmpeg"
        owner: "{{ emacsconf_user }}"
        group: "{{ emacsconf_group }}"
        mode: 0775
    - name: Copy logo
      copy:
        src: logo.png
        dest: "~{{ emacsconf_user }}/logo.png"
        owner: "{{ emacsconf_user }}"
        group: "{{ emacsconf_group }}"
    # - name: Start jack
    #   shell: jackd -r -ddummy
    #   async: 2592000
    - name: Set up pulse
      include: pulse.yml
      tags: pulse
    - name: Set up I3 directory
      file:
        path: "~{{ emacsconf_user }}/.config/i3"
        state: directory
        owner: "{{ emacsconf_user }}"
        group: "{{ emacsconf_group }}"
    - name: Set up I3
      template:
        src: i3-config
        dest: "~{{ emacsconf_user }}/.config/i3/config"
        owner: "{{ emacsconf_user }}"
        group: "{{ emacsconf_group }}"        
    - name: Set up Mumble configuration directory
      tags: mumble
      file:
        path: "~{{ emacsconf_user }}/.config/Mumble"
        state: directory
        owner: "{{ emacsconf_user }}"
        group: "{{ emacsconf_group }}"
    - name: Set up mumble
      tags: mumble
      template:
        src: Mumble.conf
        dest: "~{{ emacsconf_user }}/.config/Mumble/Mumble.conf"
        owner: "{{ emacsconf_user }}"
        group: "{{ emacsconf_group }}"        
    - name: Set up Emacs configuration
      tags: wip
      include: emacs.yml
    - name: Set up symbolic links
      file:
        src: "/data/{{ emacsconf_id }}/assets/stream"
        dest: "~{{ emacsconf_user }}/stream"
        state: link
    - name: Create background music script
      tags: wip
      template:
        src: start-background-music
        dest: "~{{ emacsconf_user }}/bin/start-background-music"
        owner: "{{ emacsconf_user }}"
        group: "{{ emacsconf_group }}"
        mode: 0775
- name: Reset vars
  tags: obs-scene, obs-profile, mpv, wip, mumble
  set_fact:
    old_emacsconf_user: "{{ emacsconf_user }}"
    old_emacsconf_home: "{{ emacsconf_home }}"
    emacsconf_user: "{{ old_emacsconf_user }}"
    emacsconf_home: "{{ old_emacsconf_home }}"