diff --git a/roles/7dtd/files/mods/No-Respawn-Near-Backpack-2-0-0-0.zip b/roles/7dtd/files/mods/No-Respawn-Near-Backpack-2-0-0-0.zip deleted file mode 100644 index 5507fdd..0000000 Binary files a/roles/7dtd/files/mods/No-Respawn-Near-Backpack-2-0-0-0.zip and /dev/null differ diff --git a/roles/7dtd/files/mods/Singularity-v4.1.3.zip b/roles/7dtd/files/mods/Singularity-v4.1.3.zip deleted file mode 100644 index c42c1e8..0000000 Binary files a/roles/7dtd/files/mods/Singularity-v4.1.3.zip and /dev/null differ diff --git a/roles/7dtd/tasks/main.yml b/roles/7dtd/tasks/main.yml index d9a4563..68bb022 100644 --- a/roles/7dtd/tasks/main.yml +++ b/roles/7dtd/tasks/main.yml @@ -35,8 +35,18 @@ # Mods live in the bind-mounted serverfiles; the container loads them on its next start # (recreate on every deploy re-reads them). zips come from roles/7dtd/files/mods (sdtd_mods -# in vars.yml), extracted one level deep (the zips already carry their own _Singularity/ -# and zByteblazarsNoRespawnNearBackpack/ subfolders, which fix load order by name). +# in vars.yml), extracted one level deep (each zip carries its own mod subfolder; prefix +# folders with z- if they must sort LAST for load order). unarchive only ADDS — it never +# removes, so a mod dropped from sdtd_mods would keep loading: with an empty list we wipe +# the whole dir and the create-task below rebuilds it empty. Partial mod swaps are not +# auto-cleaned (the role only knows zip names, not the folders zips unpack into) — remove +# those retired folders from the box by hand. +- name: Remove 7 Days to Die Mods directory when no mods are deployed + ansible.builtin.file: + path: /opt/apps/7dtd/serverfiles/Mods + state: absent + when: sdtd_mods | length == 0 + - name: Create 7 Days to Die Mods directory (container user) ansible.builtin.file: path: /opt/apps/7dtd/serverfiles/Mods diff --git a/roles/7dtd/templates/sdtdserver.xml.j2 b/roles/7dtd/templates/sdtdserver.xml.j2 index ab5ffe2..aaebd70 100644 --- a/roles/7dtd/templates/sdtdserver.xml.j2 +++ b/roles/7dtd/templates/sdtdserver.xml.j2 @@ -84,7 +84,7 @@ - + diff --git a/vars.yml b/vars.yml index 17e5a31..42674b6 100755 --- a/vars.yml +++ b/vars.yml @@ -1,7 +1,3 @@ -## Remote sudo password for ansible become (plaintext by operator decision, same as the -## game-server passwords below). Runs the playbook without --ask-become-pass. -ansible_become_password: "bQ4Sxf5Ycrw#7ag4j$" - ## add generic 755 directory for application here directories: - /opt/apps/npm @@ -202,22 +198,15 @@ sdtd_airdrop_frequency: 72 ## PlayerKillingMode: 0 = no killing, 1 = kill allies only, 2 = kill strangers only, 3 = kill everyone sdtd_player_killing_mode: "3" sdtd_max_spawned_zombies: 64 -## EAC must be OFF because we deploy code mods (Singularity framework + the No Respawn Near -## Backpack patch below) — EAC blocks their Harmony hooks. Keep "false" while mods are installed. -sdtd_eac_enabled: "false" -## Game mods, vendored under roles/7dtd/files/mods/ and extracted into serverfiles/Mods (the -## container's bind-mounted Mods dir) by the role. Source of truth: add the zip name here AND -## drop the file into the role's files/mods dir. Load order is handled by folder prefixes — -## Singularity's leading underscore loads FIRST, the mod's z- prefix loads LAST (7dtd sorts -## Mods alphabetically). -## - Singularity (4.1.3): Byteblazar's core framework; No Respawn Near Backpack is a server -## policy implemented here, disabled by default, enabled via XML (the mod below). -## - No Respawn Near Backpack for V2 (2.0.0.0): server-side XML patch that sets Singularity's -## ServerPolicies.NoRespawnNearBackpack=true -> players CANNOT respawn near their backpack, -## they respawn at a world starting point instead. Requires EAC off (see above). -sdtd_mods: - - Singularity-v4.1.3.zip - - No-Respawn-Near-Backpack-2-0-0-0.zip +## EAC is ON (default protection). It was OFF while code mods were deployed — EAC blocks +## their Harmony hooks, so keep "false" if mods are ever reinstalled. +sdtd_eac_enabled: "true" +## Game mods: NONE deployed (Singularity 4.1.3 + No Respawn Near Backpack 2.0.0.0 were +## removed; EAC was flipped back on as part of that change). To re-add a mod: drop the zip +## into roles/7dtd/files/mods/ and list its name here. NOTE: the role's unarchive task only +## ADDS mods — retiring to an EMPTY list wipes the whole server Mods dir; swapping one mod +## for another (non-empty list) requires removing the retired folder from the box by hand. +sdtd_mods: [] sdtd_xp_multiplier: 100 sdtd_telnet_enabled: "true"