Build minecraft server.properties from Ansible variable

This commit is contained in:
Ryan Cavicchioni 2020-10-10 10:59:45 -05:00
parent c87dd6cb3e
commit e9113856ea
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D
2 changed files with 10 additions and 3 deletions

View File

@ -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

View File

@ -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 %}