blob: 5df7d564f0b5c8f2f4e253b99e6d6a7d5ade931e (
plain) (
tree)
|
|
- 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 nodesource key
apt_key:
id: 2F59B5F99B1BE0B4
keyserver: keyserver.ubuntu.com
state: present
- name: Add nodesource repository
ansible.builtin.apt_repository:
repo: deb https://deb.nodesource.com/node_20.x nodistro main
update_cache: yes
- name: Add packages
apt:
name:
- xserver-xorg-video-dummy
- i3
- inkscape # OBS overlaying PNG is prettier than SVG
- socat
- ffmpeg
- pulseaudio
- jackd2
- kitty
- kitty-terminfo
- alsa-utils
- nodejs
- dbus-x11
- obs-studio
- mumble
- 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_tasks: mpv.yml
- name: Set up track-specific things
include_tasks: 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: Set system timezone
tags: tz
community.general.timezone:
name: "{{ emacsconf_timezone }}"
- name: Restart cron
tags: tz
ansible.builtin.service:
name: cron
state: restarted
- name: Set emacsconf_user timezone
tags: tz
lineinfile:
line: export TZ={{ emacsconf_timezone }}
dest: "/home/{{ emacsconf_user }}/.bashrc"
- name: Allow sudo from {{ emacsconf_user }} to the stream users
tags: obs-sudo
become: true
become_user: root
community.general.sudoers:
name: "{{ emacsconf_user }}-{{ emacsconf_id }}-{{ item.id }}"
user: "{{ emacsconf_user }}"
runas: "{{emacsconf_id }}-{{ item.id }}"
commands: ALL
nopassword: true
with_items:
- "{{ emacsconf_tracks }}"
- name: Allow sudo from the stream users to the {{ emacsconf_user }}
tags: obs-sudo
become: true
become_user: root
community.general.sudoers:
name: "{{ emacsconf_id }}-{{ item.id }}-{{ emacsconf_user }}"
user: "{{emacsconf_id }}-{{ item.id }}"
runas: "{{ emacsconf_user }}"
commands: ALL
nopassword: true
with_items:
- "{{ emacsconf_tracks }}"
- name: Create directories
file:
owner: "{{ emacsconf_user }}"
group: "{{ emacsconf_group }}"
path: "{{ emacsconf_asset_dir }}"
state: directory
mode: 0775
- name: Set up scripts
tags: wip, obs-scripts
template:
src: "{{ item }}"
dest: /usr/local/bin
mode: 0755
loop:
- overlay
- music
- stop-music
- play
- play-with-intro
- intro
- bbb
- pad
- handle-qa
- handle-session
- reset-state
- rebroadcast
|