--- # domain: minecraft.example system_user: "{{ domain | domain_to_username }}" service_name: "{{ domain }}.service" user_directory: "{{ global_webservers_directory }}/{{ domain }}" installation_directory: "{{ user_directory }}/bin" mcrcon_directory: "{{ user_directory }}/mcrcon" data_directory: "{{ user_directory }}/data" remote_control_script: "{{ user_directory }}/cmd" launch_script: "{{ user_directory }}/launch" apparmor_profile: "{{ global_apparmor_profiles_directory }}/{{ launch_script | regex_replace('/', '.') }}" # minecraft_version: "1.10" minecraft_source_link_generator: "curl --silent https://mcversions.net/download/{{ minecraft_version | quote }} | grep --only-matching --perl-regexp '(?<=\")https://launcher.mojang.com/[^\"]+/server\\.jar(?=\")'" minecraft_source_link: "{{ lookup('pipe', minecraft_source_link_generator) }}" # direct link to server jar minecraft_port: 25565 minecraft_query_port: "{{ minecraft_port }}" minecraft_rcon_port: "{{ minecraft_port + 10 }}" minecraft_rcon_password: "{{ lookup('password', 'credentials/' + inventory_hostname + '/' + domain + '/rcon length=80') }}" java_version: 11 minecraft_ram: "1G" minecraft_start_ram: "{{ minecraft_ram }}" minecraft_max_ram: "{{ minecraft_ram }}" # 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"