Puppet Class: minecraft

Defined in:
manifests/init.pp

Overview

Parameters:

  • user (Any) (defaults to: 'minecraft')
  • group (Any) (defaults to: 'minecraft')
  • install_dir (Any) (defaults to: '/opt/minecraft')
  • source (Any) (defaults to: '1.7.4')
  • autostart (Any) (defaults to: true)
  • manage_java (Any) (defaults to: true)
  • heap_size (Any) (defaults to: '1024')
  • heap_start (Any) (defaults to: '256')
  • plugins (Any) (defaults to: {})
  • ops (Any) (defaults to: undef)
  • banned_players (Any) (defaults to: undef)
  • banned_ips (Any) (defaults to: undef)
  • white_list_players (Any) (defaults to: undef)
  • generator_settings (Any) (defaults to: '')
  • op_permisison_level (Any) (defaults to: 4)
  • allow_nether (Any) (defaults to: true)
  • level_name (Any) (defaults to: 'world')
  • enable_query (Any) (defaults to: false)
  • allow_flight (Any) (defaults to: false)
  • announce_achievments (Any) (defaults to: true)
  • server_port (Any) (defaults to: 25565)
  • level_type (Any) (defaults to: 'DEFAULT')
  • enable_rcon (Any) (defaults to: false)
  • rcon_password (Any) (defaults to: '')
  • rcon_port (Any) (defaults to: 25575)
  • force_gamemode (Any) (defaults to: false)
  • level_seed (Any) (defaults to: '')
  • server_ip (Any) (defaults to: '')
  • max_build_height (Any) (defaults to: 256)
  • spawn_npcs (Any) (defaults to: true)
  • white_list (Any) (defaults to: false)
  • spawn_animals (Any) (defaults to: true)
  • snooper_enabled (Any) (defaults to: true)
  • hardcore (Any) (defaults to: false)
  • online_mode (Any) (defaults to: true)
  • resource_pack (Any) (defaults to: '')
  • pvp (Any) (defaults to: true)
  • difficulty (Any) (defaults to: 1)
  • enable_command_block (Any) (defaults to: false)
  • gamemode (Any) (defaults to: 0)
  • player_idle_timeout (Any) (defaults to: 0)
  • max_players (Any) (defaults to: 20)
  • spawn_monsters (Any) (defaults to: true)
  • gen_structures (Any) (defaults to: true)
  • view_distance (Any) (defaults to: 10)
  • spawn_protection (Any) (defaults to: 16)
  • motd (Any) (defaults to: 'A Minecraft Server')


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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'manifests/init.pp', line 1

class minecraft(
  $user                 = 'minecraft',      # The user account for the Minecraft service
  $group                = 'minecraft',      # The user group for the Minecraft service
  $install_dir          = '/opt/minecraft', # Owned by user:group
  $source               = '1.7.4',          # Minecraft (semvar) or CraftBukkit ('recommended', 'beta', or 'dev'), or direct source (URL for wget)
  $autostart            = true,             # Start service at boot
  $manage_java          = true,             # Manage the JRE package
  $heap_size            = '1024',           # The maximum Java heap size in MB
  $heap_start           = '256',            # The initial Java heap size in MB
  $plugins              = {},               # Hash of plugins
  $ops                  = undef,
  $banned_players       = undef,
  $banned_ips           = undef,
  $white_list_players   = undef,

  # The following are server.properties attributes, see
  # http://minecraft.gamepedia.com/Server.properties for information
  # Empty strings are represented as empty in templates, unlike undef
  $generator_settings   = '',
  $op_permisison_level  = 4,
  $allow_nether         = true,
  $level_name           = 'world',
  $enable_query         = false,
  $allow_flight         = false,
  $announce_achievments = true,
  $server_port          = 25565,
  $level_type           = 'DEFAULT',
  $enable_rcon          = false,
  $rcon_password        = '',
  $rcon_port            = 25575,
  $force_gamemode       = false,
  $level_seed           = '',
  $server_ip            = '',
  $max_build_height     = 256,
  $spawn_npcs           = true,
  $white_list           = false,
  $spawn_animals        = true,
  $snooper_enabled      = true,
  $hardcore             = false,
  $online_mode          = true,
  $resource_pack        = '',
  $pvp                  = true,
  $difficulty           = 1,
  $enable_command_block = false,
  $gamemode             = 0,
  $player_idle_timeout  = 0,
  $max_players          = 20,
  $spawn_monsters       = true,
  $gen_structures       = true,
  $view_distance        = 10,
  $spawn_protection     = 16,
  $motd                 = 'A Minecraft Server') {

  include ::minecraft::packages
  include ::minecraft::properties
  include ::minecraft::service
  include ::minecraft::source
  include ::minecraft::user

  create_resources('minecraft::plugin', $plugins)
}