server/minecraft: Reworking generating server.properties

dehydrated
Felix Stupp 4 years ago
parent 8e470e3aba
commit cd3972887b
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -23,6 +23,46 @@ java_version: 11
minecraft_ram: "1G"
minecraft_start_ram: "{{ minecraft_ram }}"
minecraft_max_ram: "{{ minecraft_ram }}"
minecraft_difficulty: "normal"
minecraft_view_distance: 10
minecraft_motd: "{{ domain }} Server"
# config as dict overwriting default_config
resulting_config: "{{ default_config | combine(config) | combine(force_config) }}"
force_config: # values required for role, changing at your own risk
enable-rcon: "true" # for systemd control
query.port: "{{ minecraft_query_port }}"
rcon.password: "{{ minecraft_rcon_password }}"
rcon.port: "{{ minecraft_rcon_port }}"
server-port: "{{ minecraft_port }}"
default_config: # sane defaults for private servers, can be changed
allow-flight: "true"
allow-nether: "true"
broadcast-console-to-ops: "true"
broadcast-rcon-to-ops: "true"
difficulty: normal
enable-command-block: "false"
enable-query: "true"
enforce-whitelist: "true"
force-gamemode: "false"
function-permission-level: 2
gamemode: survival
generate-structures: "true"
hardcore: "false"
level-name: world
level-seed: ""
level-type: default
max-players: 4
motd: "{{ domain }} Server"
online-mode: "true"
op-permission-level: 3
player-idle-timeout: 0
prevent-proxy-connections: "false"
pvp: "true"
resource-pack: ""
resource-pack-sha1: ""
spawn-animals: "true"
spawn-monsters: "true"
spawn-npcs: "true"
spawn-protection: 0
view-distance: 10
white-list: "true"

@ -1,45 +1,5 @@
#Minecraft server properties
broadcast-rcon-to-ops=true
view-distance={{ minecraft_view_distance }}
max-build-height=256
server-ip=
level-seed=
rcon.port={{ minecraft_rcon_port }}
gamemode=survival
server-port={{ minecraft_port }}
allow-nether=true
enable-command-block=false
enable-rcon=true
enable-query=true
op-permission-level=4
prevent-proxy-connections=false
generator-settings=
resource-pack=
level-name=world
rcon.password={{ minecraft_rcon_password }}
player-idle-timeout=0
motd={{ minecraft_motd }}
query.port={{ minecraft_query_port }}
force-gamemode=false
hardcore=false
white-list=true
broadcast-console-to-ops=true
pvp=true
spawn-npcs=true
generate-structures=true
spawn-animals=true
snooper-enabled=true
difficulty={{ minecraft_difficulty }}
function-permission-level=2
network-compression-threshold=256
level-type=default
spawn-monsters=true
max-tick-time=60000
enforce-whitelist=true
use-native-transport=true
max-players=4
resource-pack-sha1=
spawn-protection=0
online-mode=true
allow-flight=false
max-world-size=29999984
# Generated by Ansible
{% for key, val in resulting_config.items() %}
{{ key }}={{ val }}
{% endfor %}

Loading…
Cancel
Save