summaryrefslogtreecommitdiffstats
path: root/roles/obs/tasks
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2024-10-01 19:59:03 -0400
committerSacha Chua <sacha@sachachua.com>2024-10-01 19:59:03 -0400
commit2be81b299be9cad0b03495f2ea038a01969c6cb2 (patch)
tree6f798cdf8233d0c1079eaff3a52fd3bdabf8bdf7 /roles/obs/tasks
parenta50799ae2d27ea57f9f470a9ecfb06dd77499c34 (diff)
downloademacsconf-ansible-2be81b299be9cad0b03495f2ea038a01969c6cb2.tar.xz
emacsconf-ansible-2be81b299be9cad0b03495f2ea038a01969c6cb2.zip
Update for new ansible version
Diffstat (limited to 'roles/obs/tasks')
-rw-r--r--roles/obs/tasks/main.yml35
-rw-r--r--roles/obs/tasks/obs-setup.yml8
-rw-r--r--roles/obs/tasks/track.yml13
3 files changed, 36 insertions, 20 deletions
diff --git a/roles/obs/tasks/main.yml b/roles/obs/tasks/main.yml
index 249a0bb..5df7d56 100644
--- a/roles/obs/tasks/main.yml
+++ b/roles/obs/tasks/main.yml
@@ -49,9 +49,9 @@
dest: /etc/X11/xorg.conf
- name: Set up MPV and MPVC
tags: mpv
- include: mpv.yml
+ include_tasks: mpv.yml
- name: Set up track-specific things
- include: track.yml
+ include_tasks: track.yml
loop: "{{ emacsconf_tracks }}"
- debug:
var: emacsconf_home
@@ -82,14 +82,29 @@
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
- copy:
- content: |
- {% for item in emacsconf_tracks %}
- {{ emacsconf_user }} ALL=({{ emacsconf_id }}-{{ item.id }}) NOPASSWD: ALL
- {% endfor %}
- dest: /etc/sudoers.d/50_emacsconf
+ 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 }}"
@@ -106,9 +121,13 @@
loop:
- overlay
- music
+ - stop-music
- play
- play-with-intro
- intro
- bbb
- pad
+ - handle-qa
- handle-session
+ - reset-state
+ - rebroadcast
diff --git a/roles/obs/tasks/obs-setup.yml b/roles/obs/tasks/obs-setup.yml
index 5b0fba4..4e53e8c 100644
--- a/roles/obs/tasks/obs-setup.yml
+++ b/roles/obs/tasks/obs-setup.yml
@@ -71,11 +71,3 @@
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
diff --git a/roles/obs/tasks/track.yml b/roles/obs/tasks/track.yml
index d615336..3d3a8d6 100644
--- a/roles/obs/tasks/track.yml
+++ b/roles/obs/tasks/track.yml
@@ -9,10 +9,15 @@
var: emacsconf_home
- name: Set up user
tags: obs-track-scripts
- include: user.yml
+ include_tasks: user.yml
- name: Set up user-related things
become_user: "{{ emacsconf_user }}"
block:
+ - name: Set up symlink to current
+ file:
+ src: "~{{ old_emacsconf_user }}/current"
+ dest: "~{{ emacsconf_user }}/current"
+ state: link
- name: Set up track bins for addition to paths
file:
path: "~{{ emacsconf_user }}/bin/{{ item.id }}"
@@ -20,7 +25,7 @@
group: "{{ emacsconf_group }}"
state: directory
- name: Set up VNC
- include: tigervnc.yml
+ include_tasks: tigervnc.yml
- name: Create MPV profile directory
file:
path: "~{{ emacsconf_user }}/.config/mpv"
@@ -65,7 +70,7 @@
# shell: jackd -r -ddummy
# async: 2592000
- name: Set up pulse
- include: pulse.yml
+ include_tasks: pulse.yml
tags: pulse
- name: Set up I3 directory
file:
@@ -95,7 +100,7 @@
group: "{{ emacsconf_group }}"
- name: Set up Emacs configuration
tags: wip
- include: emacs.yml
+ include_tasks: emacs.yml
- name: Set up symbolic links
file:
src: "/data/{{ emacsconf_id }}/assets/stream"