diff --git a/roles/minecraft/defaults/main.yaml b/roles/minecraft/defaults/main.yaml index c93c084..a609ef9 100644 --- a/roles/minecraft/defaults/main.yaml +++ b/roles/minecraft/defaults/main.yaml @@ -20,3 +20,8 @@ minecraft_var_path: /var/opt/minecraft minecraft_syslog_facility: local5 minecraft_notifier_state: present + +minecraft_config: + white-list: true + enforce-whitelist: true + server-port: 25565 diff --git a/roles/minecraft/templates/server.properties.j2 b/roles/minecraft/templates/server.properties.j2 index d2e93e1..68821bc 100644 --- a/roles/minecraft/templates/server.properties.j2 +++ b/roles/minecraft/templates/server.properties.j2 @@ -1,3 +1,5 @@ -white-list: {{ (minecraft_config.whitelist | default(true)) | ternary('true', 'false') }} -enforce-whitelist: {{ (minecaft_config.enfoce_whitelist | default(true)) | ternary('true', 'false') }} -server-port: {{ item.port | default(25565) }} +# {{ ansible_managed }} + +{% for k, v in minecraft_config.items() | default({}) %} +{{ k }}: {{ v }} +{% endfor %}