From 25eb2330f107ab9cd995a46f64c273e196442e31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=E4kinen?= Date: Fri, 5 Aug 2011 11:43:14 +0300 Subject: [PATCH] Initial version of minecraft module. --- minecraft/Makefile | 9 +++++++++ minecraft/files/minecraft | 4 ++++ minecraft/manifests/init.pp | 23 +++++++++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 minecraft/Makefile create mode 100755 minecraft/files/minecraft create mode 100644 minecraft/manifests/init.pp diff --git a/minecraft/Makefile b/minecraft/Makefile new file mode 100644 index 0000000..8325252 --- /dev/null +++ b/minecraft/Makefile @@ -0,0 +1,9 @@ + +URL = http://www.minecraft.net/download/minecraft.jar +OUT = /srv/puppet/files/common/packages + +all: $(OUT)/minecraft.jar + +$(OUT)/minecraft.jar: + @umask 022 + cd $(OUT) && wget -nv -N $(URL) diff --git a/minecraft/files/minecraft b/minecraft/files/minecraft new file mode 100755 index 0000000..af3d7f7 --- /dev/null +++ b/minecraft/files/minecraft @@ -0,0 +1,4 @@ +#!/bin/sh + +exec java -Xmx1024M -Xms512M -cp /usr/local/lib/minecraft.jar \ + net.minecraft.LauncherFrame diff --git a/minecraft/manifests/init.pp b/minecraft/manifests/init.pp new file mode 100644 index 0000000..15f0014 --- /dev/null +++ b/minecraft/manifests/init.pp @@ -0,0 +1,23 @@ + +# Install Minecraft +# +class minecraft { + + file { "/usr/local/lib/minecraft.jar": + ensure => present, + source => "puppet:///files/packages/minecraft.jar", + mode => 0644, + owner => "root", + group => "root", + } + + file { "/usr/local/bin/minecraft": + ensure => present, + source => "puppet:///minecraft/minecraft", + mode => 0755, + owner => "root", + group => "root", + require => File["/usr/local/lib/minecraft.jar"], + } + +}