initial opencode commit
This commit is contained in:
17
roles/minecraft/templates/geyser-config.yml.j2
Normal file
17
roles/minecraft/templates/geyser-config.yml.j2
Normal file
@@ -0,0 +1,17 @@
|
||||
# Managed by Ansible - minecraft role (Geyser bridge).
|
||||
# Minimal config: Geyser merges these keys over its built-in defaults.
|
||||
# The Java server shares the pod's network namespace, so it is reachable
|
||||
# at 127.0.0.1:{{ minecraft_container_port }}.
|
||||
|
||||
bedrock:
|
||||
address: 0.0.0.0
|
||||
port: {{ geyser_port }}
|
||||
clone-remote-port: false
|
||||
enable-proxy-protocol: false
|
||||
|
||||
remote:
|
||||
address: {{ geyser_remote_address }}
|
||||
port: {{ minecraft_container_port }}
|
||||
auth-type: {{ geyser_auth_type }}
|
||||
allow-passthrough-motd: true
|
||||
allow-passthrough-player-counts: true
|
||||
18
roles/minecraft/templates/geyser.container.j2
Normal file
18
roles/minecraft/templates/geyser.container.j2
Normal file
@@ -0,0 +1,18 @@
|
||||
[Unit]
|
||||
Description=Geyser Bedrock bridge container ({{ geyser_image }})
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Container]
|
||||
Label=app=geyser
|
||||
ContainerName=geyser
|
||||
Pod=minecraft.pod
|
||||
Image={{ geyser_image }}
|
||||
Volume={{ minecraft_data_dir }}/geyser:/geyser:Z
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
33
roles/minecraft/templates/minecraft-server.container.j2
Normal file
33
roles/minecraft/templates/minecraft-server.container.j2
Normal file
@@ -0,0 +1,33 @@
|
||||
[Unit]
|
||||
Description=Minecraft Java server container ({{ minecraft_image }})
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Container]
|
||||
Label=app=minecraft-server
|
||||
ContainerName=minecraft-server
|
||||
Pod=minecraft.pod
|
||||
Image={{ minecraft_image }}
|
||||
Environment=EULA=TRUE
|
||||
Environment=TYPE={{ minecraft_server_type }}
|
||||
Environment=VERSION={{ minecraft_version }}
|
||||
Environment=MEMORY={{ minecraft_memory }}
|
||||
Environment=DIFFICULTY={{ minecraft_difficulty }}
|
||||
Environment=MOTD={{ minecraft_motd }}
|
||||
Environment=MAX_PLAYERS={{ minecraft_max_players }}
|
||||
Environment=VIEW_DISTANCE={{ minecraft_view_distance }}
|
||||
Environment=ONLINE_MODE={{ minecraft_online_mode }}
|
||||
Environment=OVERRIDE_SERVER_PROPERTIES=TRUE
|
||||
{% if minecraft_whitelist | length > 0 %}
|
||||
Environment=ENABLE_WHITELIST=TRUE
|
||||
Environment=WHITELIST={{ minecraft_whitelist }}
|
||||
{% endif %}
|
||||
Volume={{ minecraft_data_dir }}/data:/data:Z
|
||||
Volume={{ minecraft_data_dir }}/backups:/backups:Z
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
14
roles/minecraft/templates/minecraft.pod.j2
Normal file
14
roles/minecraft/templates/minecraft.pod.j2
Normal file
@@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=Minecraft pod (Java server + Geyser bridge)
|
||||
|
||||
[Pod]
|
||||
PublishPort={{ minecraft_port }}:25565/tcp
|
||||
{% if minecraft_udp | bool %}
|
||||
PublishPort={{ minecraft_port }}:25565/udp
|
||||
{% endif %}
|
||||
{% if enable_geyser | bool %}
|
||||
PublishPort={{ geyser_port }}:{{ geyser_port }}/udp
|
||||
{% endif %}
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
Reference in New Issue
Block a user