summaryrefslogblamecommitdiffstats
path: root/roles/obs/tasks/main.yml
blob: bf856ec9896ea982d02b815dd7549cfa97359aaf (plain) (tree)
1
2
                         
                        


















                                        
               
                     







                                        



                            


                           

                                    
                                













                                                                       









                                                                                  
- name: Load icecast vars
  tags: obs-profile, wip
  include_vars:
    file: ../../stream/defaults/main.yml
- name: Add repo
  apt_repository:
    repo: ppa:obsproject/obs-studio
  when: ansible_distribution == "Ubuntu"
- name: Add packages
  apt:
    name:
      - xserver-xorg-video-dummy
      - i3
      - socat
      - ffmpeg
      - pulseaudio
      - jackd2
      - alsa-utils
      - dbus-x11
      - obs-studio
      - xserver-xorg-dev
      - xdotool
    update_cache: yes
- name: Add Firefox
  apt:
    name: firefox-esr
  when: ansible_distribution == "Debian"
- name: Add Firefox
  apt:
    name: firefox-esr
  when: ansible_distribution == "Ubuntu"
- name: Copy X11 config
  template:
    src: xorg.conf
    dest: /etc/X11/xorg.conf
- name: Set up MPV and MPVC
  tags: mpv
  include: mpv.yml
- name: Set up track-specific things
  include: track.yml
  loop: "{{ emacsconf_tracks }}"
- debug:
    var: emacsconf_home
- name: Add packages
  apt:
    name:
      - tigervnc-standalone-server
      - tigervnc-common
  tags: vnc
- name: Allow SSH for the users
  replace:
    dest: /etc/ssh/sshd_config.d/emacsconf_ssh.conf
    regexp: '(AllowUsers(?!.*\b{{ emacsconf_id }}-{{ item.id }}\b).*)$'
    replace: \1 {{ emacsconf_id }}-{{ item.id }}
  loop: "{{ emacsconf_tracks }}"
- name: Allow sudo from {{ emacsconf_user }} to the stream users
  tags: wip
  become: true
  become_user: root
  copy:
    content: |
      {% for item in emacsconf_tracks %}
        {{ emacsconf_user }}  ALL=({{ emacsconf_id }}-{{ item.id }}) NOPASSWD: ALL
      {% endfor %}    
    dest: /etc/sudoers.d/50_emacsconf