summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2020-06-08 23:11:22 -0400
committerJesse Luehrs <doy@tozt.net>2020-06-08 23:11:22 -0400
commit43df79ed21379e8f2f795ab3a5ae4b9b74346779 (patch)
tree1541e51a6f7add40787067f0d900f4f8c8faf604
parent20351f32beb482a1a903523964c31ea1b17ce2a9 (diff)
downloadpuppet-tozt-43df79ed21379e8f2f795ab3a5ae4b9b74346779.tar.gz
puppet-tozt-43df79ed21379e8f2f795ab3a5ae4b9b74346779.zip
allow watching twitch via partofme
-rw-r--r--manifests/partofme.pp1
-rw-r--r--modules/base/manifests/users.pp2
-rw-r--r--modules/partofme/files/twitch3
-rw-r--r--modules/partofme/manifests/twitch.pp10
4 files changed, 15 insertions, 1 deletions
diff --git a/manifests/partofme.pp b/manifests/partofme.pp
index a8056f1..a86df6a 100644
--- a/manifests/partofme.pp
+++ b/manifests/partofme.pp
@@ -14,4 +14,5 @@ node 'partofme', 'partofme.localdomain' {
include partofme::mdadm
include partofme::monitoring
include partofme::persistent
+ include partofme::twitch
}
diff --git a/modules/base/manifests/users.pp b/modules/base/manifests/users.pp
index 964c02e..b6df04d 100644
--- a/modules/base/manifests/users.pp
+++ b/modules/base/manifests/users.pp
@@ -5,7 +5,7 @@ class base::users {
base::user { $::default_user:
pwhash => secret::value("passwd/$default_user"),
- extra_groups => ['wheel'],
+ extra_groups => ['wheel', 'video', 'audio'],
homedir_mode => '0701';
}
diff --git a/modules/partofme/files/twitch b/modules/partofme/files/twitch
new file mode 100644
index 0000000..c28b80b
--- /dev/null
+++ b/modules/partofme/files/twitch
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+streamlink -p "cvlc -A alsa --alsa-audio-device hdmi:CARD=PCH,DEV=2 -V fb --no-fb-tty" twitch.tv/"${1}" best
diff --git a/modules/partofme/manifests/twitch.pp b/modules/partofme/manifests/twitch.pp
new file mode 100644
index 0000000..13bd824
--- /dev/null
+++ b/modules/partofme/manifests/twitch.pp
@@ -0,0 +1,10 @@
+class partofme::twitch {
+ package { ["streamlink", "vlc"]:
+ ensure => installed;
+ }
+
+ file { "/usr/local/bin/twitch":
+ mode => "0755",
+ source => 'puppet:///modules/partofme/twitch';
+ }
+}