Hopefully fix erroneous MultiMC pack detection

This commit is contained in:
Salt 2020-06-24 10:29:58 -05:00
parent b044082ea1
commit 8e9f6a9582

View File

@ -70,19 +70,21 @@
remote_src: yes
dest: "/var/minecraft/{{ mcname }}"
notify: "restart minecraft {{ mcname }}"
- name: Check for MultiMC pack
stat:
path: "/var/minecraft/{{ mcname }}/.minecraft"
register: stat_mcroot_multimc
- name: Look for MultiMC pack
find:
path: "/var/minecraft/{{ mcname }}"
patterns: '.minecraft'
ignore_errors: yes
register: find_multimc
- name: Move .minecraft contents to root
command:
chdir: "/var/minecraft/{{ mcname }}"
argv:
- mv
- "/var/minecraft/{{ mcname }}/.minecraft/*"
- "/var/minecraft/{{ mcname }}/*/.minecraft/*"
- "."
notify: "restart minecraft {{ mcname }}"
when: stat_mcroot_multimc.stat.exists
when: not find_multimc is failed
- name: Remove MultiMC artifacts
file:
path: "{{ item }}"
@ -91,7 +93,7 @@
- "/var/minecraft/{{ mcname }}/.minecraft"
- "/var/minecraft/{{ mcname }}/instance.cfg"
- "/var/minecraft/{{ mcname }}/mmc-pack.json"
when: stat_mcroot_multimc.stat.exists
when: not find_multimc is failed
when: get_mcpack is changed
- name: Check for Forge
stat: