added project zomboid server

This commit is contained in:
2026-09-16 15:11:26 -06:00
parent 004ca50738
commit 6c999f07e8
3 changed files with 60 additions and 10 deletions

View File

@@ -1,6 +1,7 @@
---
# Project Zomboid dedicated server (danixu86 container, SteamCMD-based, B42-ready).
# Players: zomboid.boxswapper.io:16261 (UDP) - direct connect or in-game browser (PUBLIC=true).
# PRIVATE server: players direct-connect to zomboid.boxswapper.io:16261 (UDP) and enter the join
# password (zomboid_password). Not listed in the in-game server browser (PUBLIC=false).
# External prerequisites (NOT managed by this repo):
# - Cloudflare A record zomboid.boxswapper.io -> public IP (grey-cloud, like mc.boxswapper.io)
# - Router port forwards: UDP 16261-16276 + TCP 27015 (RCON) -> 10.10.0.46
@@ -11,6 +12,32 @@
state: directory
mode: '0755'
# The image (cm2network/steamcmd:root base) owns files in /home/steam as the steam user, uid/gid 1000.
# Pre-seeding dirs with that ownership lets the entry script and server write alongside our ini.
- name: Create Project Zomboid server data dir
ansible.builtin.file:
path: /opt/apps/zomboid/data/Zomboid
state: directory
owner: '1000'
group: '1000'
mode: '0755'
- name: Create Project Zomboid server config directory
ansible.builtin.file:
path: /opt/apps/zomboid/data/Zomboid/Server
state: directory
owner: '1000'
group: '1000'
mode: '0755'
- name: Template Project Zomboid server ini from vars.yml
ansible.builtin.template:
src: zomboid.ini.j2
dest: "/opt/apps/zomboid/data/Zomboid/Server/{{ zomboid_servername }}.ini"
owner: '1000'
group: '1000'
mode: '0644'
- name: Deploy Project Zomboid Server
containers.podman.podman_container:
image: "{{ zomboid_image }}"
@@ -38,6 +65,7 @@
RCONPASSWORD: "{{ zomboid_rcon_password }}"
SERVERNAME: "{{ zomboid_servername }}"
DISPLAYNAME: "{{ zomboid_displayname }}"
PASSWORD: "{{ zomboid_password }}"
PUBLIC: "{{ zomboid_public }}"
MEMORY: "{{ zomboid_memory }}"
SERVERPRESET: "{{ zomboid_preset }}"