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
|
# File 'manifests/source.pp', line 1
class minecraft::source {
$jar_name = 'minecraft_server'
case $minecraft::source {
/^(\d+)\.(\d+)\.(\d+)$/: { # Matches Semantic Versioning for vanilla Minecraft, see http://semver.org/
$download = "https://s3.amazonaws.com/Minecraft.Download/versions/${minecraft::source}/minecraft_server.${minecraft::source}.jar"
}
'recommended', 'rb', 'stable': {
$download = 'http://dl.bukkit.org/latest-rb/craftbukkit.jar'
}
'beta', 'dev': {
$download = "http://dl.bukkit.org/latest-${minecraft::source}/craftbukkit-${minecraft::source}.jar"
}
default: {
$download = $minecraft::source
}
}
wget::fetch { 'minecraft':
source => $download,
destination => "${minecraft::install_dir}/minecraft_server.jar",
require => User[$minecraft::user],
}
}
|