163 lines
4.4 KiB
YAML
163 lines
4.4 KiB
YAML
---
|
|
# =============================================================================
|
|
# Minecraft Podman Deployment - Global Variables
|
|
# =============================================================================
|
|
# All variables defined here can be overridden in host_vars/<hostname>.yml
|
|
# or passed at runtime with -e "variable=value"
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Server Configuration
|
|
# -----------------------------------------------------------------------------
|
|
minecraft:
|
|
# Server name - used for systemd service naming and container name
|
|
server_name: "minecraft"
|
|
|
|
# Minecraft version (latest, 1.21.4, 1.20.6, etc.)
|
|
version: "latest"
|
|
|
|
# Server type: "vanilla", "paper", "fabric", "forge", "purpur"
|
|
server_type: "paper"
|
|
|
|
# Memory allocation for Java (e.g., "4G", "8G", "2G")
|
|
java_memory: "4G"
|
|
|
|
# Java JVM arguments (additional flags beyond memory)
|
|
java_args: "-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200"
|
|
|
|
# Maximum players allowed
|
|
max_players: 20
|
|
|
|
# Server port (default Minecraft port: 25565)
|
|
port: 25565
|
|
|
|
# RCON port (for remote console access)
|
|
rcon_port: 25575
|
|
|
|
# Enable RCON (useful for management)
|
|
rcon_enabled: true
|
|
|
|
# RCON password (CHANGE THIS!)
|
|
rcon_password: "CHANGE_ME_NOW"
|
|
|
|
# Server MOTD (Message of the Day)
|
|
motd: "Welcome to the Minecraft Server!"
|
|
|
|
# Game mode: survival, creative, adventure, spectator
|
|
game_mode: "survival"
|
|
|
|
# Difficulty: peaceful, easy, normal, hard
|
|
difficulty: "normal"
|
|
|
|
# Enable whitelist
|
|
whitelist_enabled: false
|
|
|
|
# Allow command blocks
|
|
enable_command_block: false
|
|
|
|
# View distance (chunks, max 32)
|
|
view_distance: 10
|
|
|
|
# Simulation distance (chunks)
|
|
simulation_distance: 6
|
|
|
|
# Online mode (true = requires Mojang account verification)
|
|
online_mode: true
|
|
|
|
# Max world size (blocks, default 29999984)
|
|
max_world_size: 29999984
|
|
|
|
# Spawn protection (blocks around spawn that can't be modified)
|
|
spawn_protection: 16
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Podman Configuration
|
|
# -----------------------------------------------------------------------------
|
|
podman:
|
|
# Container image (itzg/minecraft-server is highly configurable)
|
|
image: "itzg/minecraft-server"
|
|
|
|
# Image tag (usually the server type)
|
|
image_tag: "latest"
|
|
|
|
# Container restart policy: always, unless-stopped, on-failure, no
|
|
restart_policy: "unless-stopped"
|
|
|
|
# Container memory limit (leave empty for unlimited)
|
|
memory_limit: ""
|
|
|
|
# CPU shares (relative weight)
|
|
cpu_shares: 1024
|
|
|
|
# Container log driver
|
|
log_driver: "journald"
|
|
|
|
# Container log max size
|
|
log_max_size: "50m"
|
|
|
|
# Container log max file count
|
|
log_max_file: "3"
|
|
|
|
# Extra volumes to mount (format: "host_path:container_path:options")
|
|
extra_volumes: []
|
|
|
|
# Container labels
|
|
labels:
|
|
managed-by: "ansible"
|
|
app: "minecraft"
|
|
|
|
# Network mode (host, bridge, or slirp4netns)
|
|
network_mode: "host"
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Path Configuration
|
|
# -----------------------------------------------------------------------------
|
|
paths:
|
|
# Base installation directory
|
|
base_dir: "/opt/minecraft"
|
|
|
|
# Data directory (where world, configs, etc. are stored)
|
|
data_dir: "/opt/minecraft/data"
|
|
|
|
# Backup directory
|
|
backup_dir: "/opt/minecraft/backups"
|
|
|
|
# Systemd service directory
|
|
systemd_dir: "/etc/systemd/system"
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Backup Configuration
|
|
# -----------------------------------------------------------------------------
|
|
backup:
|
|
# Enable automatic backups
|
|
enabled: true
|
|
|
|
# Backup schedule (cron format)
|
|
schedule: "0 */6 * * *" # Every 6 hours
|
|
|
|
# Number of backups to retain
|
|
retention_count: 10
|
|
|
|
# Compress backups with gzip
|
|
compress: true
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Firewall Configuration
|
|
# -----------------------------------------------------------------------------
|
|
firewall:
|
|
# Open Minecraft ports in firewalld
|
|
enabled: true
|
|
|
|
# Additional ports to open (for mods, voice chat, etc.)
|
|
additional_ports:
|
|
- "19132/udp" # Bedrock (if needed)
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Monitoring (Optional)
|
|
# -----------------------------------------------------------------------------
|
|
monitoring:
|
|
# Enable basic health checks
|
|
enabled: false
|
|
|
|
# Health check interval in seconds
|
|
interval: 300
|