From 3517e71f603527f81e3ca1bf8ded9698b3934d32 Mon Sep 17 00:00:00 2001 From: Salt Date: Wed, 24 Jun 2020 10:18:09 -0500 Subject: [PATCH] Remove remnants of old pack when pushing an update --- roles/minecraft/tasks/main.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/roles/minecraft/tasks/main.yml b/roles/minecraft/tasks/main.yml index 98a8e33..dc82edf 100644 --- a/roles/minecraft/tasks/main.yml +++ b/roles/minecraft/tasks/main.yml @@ -49,6 +49,15 @@ register: get_mcpack - name: Install modpack block: + - name: Remove remnants of old pack + file: + path: "{{ item }}" + state: absent + loop: + - "/var/minecraft/{{ mcname }}/config" + - "/var/minecraft/{{ mcname }}/coremods" + - "/var/minecraft/{{ mcname }}/mods" + - "/var/minecraft/{{ mcname }}/scripts" - name: Unpack zip unarchive: src: "/var/minecraft/{{ mcname }}/modpack.zip"