summaryrefslogtreecommitdiff
path: root/elevate/ele-hyperion.yml
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2024-08-24 19:25:40 +0200
committerChristian Pointner <equinox@spreadspace.org>2024-08-24 19:25:40 +0200
commitb17c559251dfd157fe2cf220044887f08208bb3c (patch)
treef395cb16d81a65955f9a12a88c9eab862848d976 /elevate/ele-hyperion.yml
parentallow ssh jump users to also do reverse forwards (diff)
split environment group dan to skillz and elevate
Diffstat (limited to 'elevate/ele-hyperion.yml')
-rw-r--r--elevate/ele-hyperion.yml67
1 files changed, 67 insertions, 0 deletions
diff --git a/elevate/ele-hyperion.yml b/elevate/ele-hyperion.yml
new file mode 100644
index 00000000..3402de41
--- /dev/null
+++ b/elevate/ele-hyperion.yml
@@ -0,0 +1,67 @@
+---
+- name: Basic Setup
+ hosts: ele-hyperion
+ roles:
+ - role: apt-repo/base
+ - role: core/base
+ - role: core/sshd/base
+ - role: core/zsh
+ - role: core/ntp
+ - role: core/cpu-microcode
+
+- name: Payload Setup
+ hosts: ele-hyperion
+ roles:
+ - role: apt-repo/obs-studio
+ - role: apt-repo/spreadspace
+ - role: nginx/base
+ - role: monitoring/prometheus/exporter
+ - role: ws/base
+ - role: core/users
+ - role: streaming/blackmagic/desktopvideo
+ - role: streaming/blackmagic/mediaexpress
+ - role: docker/engine
+ post_tasks:
+ ## TODO: move to network/netplan when this is done
+ - name: install vlan interfaces
+ loop: "{{ network.vlans | dict2items }}"
+ loop_control:
+ label: "{{ item.key }} ({{ item.value | join(',') }})"
+ copy:
+ dest: "/etc/netplan/20-{{ item.key }}.yaml"
+ content: |
+ network:
+ vlans:
+ {% for vlan in item.value %}
+ {% set vlan_ifname = item.key + '.' + (vlan | string) %}
+ {% set vlan_iface = (network.interfaces | selectattr('name', 'eq', vlan_ifname)) %}
+ {{ vlan_ifname }}:
+ id: {{ vlan }}
+ link: {{ item.key }}
+ {% if vlan_iface %}
+ addresses:
+ - {{ (vlan_iface | first).address }}
+ {% endif %}
+ {% endfor %}
+
+ - name: install script to play videos via decklink card
+ copy:
+ dest: /usr/local/bin/play-video.sh
+ mode: 0755
+ content: |
+ #!/bin/bash
+
+ if [ -z "$1" ]; then
+ echo "Usage: $0 <vidoe-file>"
+ exit 1
+ fi
+ video_path_full=$(realpath "$1")
+ video_name=$(basename "$video_path_full")
+
+ decklink_device="DeckLink Duo (2)"
+
+ exec docker run --rm -it --device=/dev/blackmagic:/dev/blackmagic -v /usr/lib/libDeckLinkAPI.so:/usr/lib/libDeckLinkAPI.so \
+ -v /usr/lib/libDeckLinkAPI.so:/usr/lib/libDeckLinkAPI.so -v /usr/lib/blackmagic:/usr/lib/blackmagic \
+ -v "$video_path_full:/srv/$video_name" \
+ registry.gitlab.com/spreadspace/docker/ffmpeg:bookworm-decklink12.5-2024-02-18.33 \
+ /usr/bin/ffmpeg -i "/srv/$video_name" -ac 2 -pix_fmt uyvy422 -s 1920x1080 -r 25 -f decklink "$decklink_device"