From ec17f8b8b47875c8cb673bcd8d9e77b0a3774f75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=E4kinen?= Date: Thu, 1 Aug 2013 16:09:49 +0300 Subject: [PATCH] icecast: Initial version of module. --- icecast/manifests/init.pp | 33 ++++++ icecast/templates/icecast.xml.erb | 172 ++++++++++++++++++++++++++++++ 2 files changed, 205 insertions(+) create mode 100644 icecast/manifests/init.pp create mode 100644 icecast/templates/icecast.xml.erb diff --git a/icecast/manifests/init.pp b/icecast/manifests/init.pp new file mode 100644 index 0000000..80285ab --- /dev/null +++ b/icecast/manifests/init.pp @@ -0,0 +1,33 @@ + +# Install Icecast server +# +# === Parameters: +# +# $sourcepass: +# Password for stream sources. +# +# $adminpass: +# Password for admin pages. +# +class icecast::server($sourcepass, $adminpass) { + + package { "icecast": + ensure => installed, + } + + file { "/etc/icecast.xml": + ensure => present, + content => template("icecast/icecast.xml.erb"), + mode => "0640", + owner => "root", + group => "icecast", + require => Package["icecast"], + notify => Service["icecast"], + } + + service { "icecast": + ensure => running, + enable => true, + } + +} diff --git a/icecast/templates/icecast.xml.erb b/icecast/templates/icecast.xml.erb new file mode 100644 index 0000000..2346d8f --- /dev/null +++ b/icecast/templates/icecast.xml.erb @@ -0,0 +1,172 @@ + + + 100 + 2 + 5 + 524288 + 30 + 15 + 10 + + 1 + + 65535 + + + + + <%= @sourcepass -%> + + + + + admin + <%= @adminpass -%> + + + + + + + + + localhost + + + + 8000 + + + + + + + + + + + + + + + + + + 1 + + + + /usr/share/icecast + + + /var/log/icecast + /usr/share/icecast/web + /usr/share/icecast/admin + /var/run/icecast/icecast.pid + + + + + + + + + access.log + error.log + + 3 + 10000 + + + + + + 0 + + icecast + icecast + + +