1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
class icecast(
$config_content = lookup('icecast::config_content', undef, undef, false),
$config_source = [ "puppet:///modules/site_icecast/${::hostname}.conf",
"puppet:///modules/icecast/icecast.conf" ],
) {
package { 'icecast2':
ensure => present,
}
file { '/etc/icecast2/icecast.xml':
ensure => present,
owner => 'icecast2',
group => 'icecast',
mode => '0660',
require => Package['icecast2'],
notify => Service['icecast2'],
}
service { 'icecast2':
ensure => running,
}
if $config_content {
File['/etc/icecast2/icecast.xml']{
content => $config_content,
}
} else {
File['/etc/icecast2/icecast.xml']{
source => $config_source,
}
}
}
|