Update minecraft role

This commit is contained in:
Salt 2020-12-21 01:22:24 -06:00
parent 42ccb2bcc6
commit 36c61436ed
2 changed files with 11 additions and 3 deletions

View File

@ -20,6 +20,9 @@ minecraft_forge_downloadurl: "https://files.minecraftforge.net/maven/net/minecra
#minecraft_forge_packurl: https://path.to.your/modpack.zip
# Define THIS if you want to download a bunch of mods by JAR URL:
minecraft_forge_mods: []
# Define THIS if you want to remove any mods that come with a pack by default
# Just a list of filenames in /mods. Matches directories, too
minecraft_forge_mods_remove: []
minecraft_vanilla_install: no
minecraft_vanilla_downloadurl: "https://launcher.mojang.com/v1/objects/35139deedbd5182953cf1caa23835da59ca3d7cd/server.jar"
@ -38,4 +41,4 @@ minecraft_jre_xmx: 4096m
# - { opt: allow-flight, value: "false" }
# - opt: gamemode
# value: 0
minecraft_server_properties: {}
minecraft_server_properties: []

View File

@ -36,7 +36,7 @@
# TODO: Manage configs for plugins, auto-install plugins
become: yes
become_user: minecraft
when: minecraft_fabric_install
when: minecraft_paper_install
- name: set up forge
block:
- name: template out modpack installer
@ -73,8 +73,13 @@
- name: install mods
get_url: dest="{{ minecraft_home }}/{{ minecraft_name }}/mods" url={{ item }}
loop: "{{ minecraft_forge_mods }}"
notify: restart minecraft {{ minecraft_name }}
notify: "restart minecraft {{ minecraft_name }}"
when: minecraft_forge_mods is iterable and minecraft_forge_mods != None
- name: remove mods
file: path={{ minecraft_home }}/{{ minecraft_name }}/mods/{{ item }} state=absent
loop: "{{ minecraft_forge_mods_remove }}"
notify: "restart minecraft {{ minecraft_name }}"
when: minecraft_forge_mods_remove is iterable and minecraft_forge_mods_remove != None
become: yes
become_user: minecraft
when: minecraft_forge_install and minecraft_forge_version is defined