Implement support for new naming scheme

This commit is contained in:
Salt 2020-06-24 10:51:11 -05:00
parent db8eb6ae03
commit 847a83b209

View File

@ -105,11 +105,22 @@
- "--installServer"
args:
creates: "/var/minecraft/{{ mcname }}/forge-{{ mcforge }}-universal.jar"
- name: Link server jar
- name: Find classic jar name
stat:
path: "/var/minecraft/{{ mcname }}/forge-{{ mcforge }}-universal.jar"
register: stat_mcroot_newjar
- name: Link old-style server jar
file:
path: "/var/minecraft/{{ mcname }}/server.jar"
src: "/var/minecraft/{{ mcname }}/forge-{{ mcforge }}-universal.jar"
state: link
when: stat_mcroot_newjar.stat.exists
- name: Link new-style server jar
file:
path: "/var/minecraft/{{ mcname }}/server.jar"
src: "/var/minecraft/{{ mcname }}/forge-{{ mcforge }}.jar"
state: link
when: not stat_mcroot_newjar.stat.exists
when: not stat_mcroot_forgejar.stat.exists
- name: Configure server
block: