Add more options for minecraft role
This commit is contained in:
parent
ca070782c9
commit
4bee97a542
4 changed files with 48 additions and 6 deletions
|
@ -2,4 +2,7 @@
|
||||||
- hosts: webservers
|
- hosts: webservers
|
||||||
roles:
|
roles:
|
||||||
- name: minecraft
|
- name: minecraft
|
||||||
|
eula: true
|
||||||
|
user: 1003:972
|
||||||
server_name: Comfy Camp
|
server_name: Comfy Camp
|
||||||
|
use_simd_flags: true
|
||||||
|
|
|
@ -1,10 +1,36 @@
|
||||||
argument_specs:
|
argument_specs:
|
||||||
main:
|
main:
|
||||||
options:
|
options:
|
||||||
|
user:
|
||||||
|
type: str
|
||||||
eula:
|
eula:
|
||||||
type: bool
|
type: bool
|
||||||
|
motd:
|
||||||
|
type: str
|
||||||
server_type:
|
server_type:
|
||||||
type: str
|
type: str
|
||||||
|
choices:
|
||||||
|
- VANILLA
|
||||||
|
- BUKKIT
|
||||||
|
- SPIGOT
|
||||||
|
- CANYON
|
||||||
|
- FABRIC
|
||||||
|
- FORGE
|
||||||
|
- NEOFORGE
|
||||||
|
- MAGMA
|
||||||
|
- MAGMA_MAINTAINED
|
||||||
|
- KETTING
|
||||||
|
- MOHIST
|
||||||
|
- CATSERVER
|
||||||
|
- SPONGEVANILLA
|
||||||
|
- LIMBO
|
||||||
|
- CRUCIBLE
|
||||||
|
- CUSTOM
|
||||||
|
- PAPER
|
||||||
|
- PUFFERFISH
|
||||||
|
- PURPUR
|
||||||
|
- FOLIA
|
||||||
|
- QUILT
|
||||||
server_version:
|
server_version:
|
||||||
type: str
|
type: str
|
||||||
online_mode:
|
online_mode:
|
||||||
|
@ -13,5 +39,12 @@ argument_specs:
|
||||||
type: str
|
type: str
|
||||||
difficulty:
|
difficulty:
|
||||||
type: str
|
type: str
|
||||||
tz:
|
choices:
|
||||||
type: str
|
- peaceful
|
||||||
|
- easy
|
||||||
|
- normal
|
||||||
|
- hard
|
||||||
|
max_players:
|
||||||
|
type: int
|
||||||
|
use_simd_flags:
|
||||||
|
type: bool
|
||||||
|
|
|
@ -9,17 +9,20 @@
|
||||||
image: itzg/minecraft-server:stable
|
image: itzg/minecraft-server:stable
|
||||||
ports:
|
ports:
|
||||||
- "25565:25565"
|
- "25565:25565"
|
||||||
user: "1003:972"
|
user: "{{ user }}"
|
||||||
env:
|
env:
|
||||||
EULA: "{{ eula | string }}"
|
EULA: "{{ eula | string }}"
|
||||||
|
MOTD: "{{ motd }}"
|
||||||
TYPE: "{{ server_type }}"
|
TYPE: "{{ server_type }}"
|
||||||
VERSION: "{{ server_version }}"
|
VERSION: "{{ server_version }}"
|
||||||
DIFFICULTY: "{{ difficulty }}"
|
DIFFICULTY: "{{ difficulty }}"
|
||||||
ONLINE_MODE: "{{ online_mode | string }}"
|
ONLINE_MODE: "{{ online_mode | string }}"
|
||||||
SERVER_NAME: "{{ server_name }}"
|
SERVER_NAME: "{{ server_name }}"
|
||||||
TZ: "{{ tz }}"
|
MAX_PLAYERS: "{{ max_players | string }}"
|
||||||
|
USE_SIMD_FLAGS: "{{ use_simd_flags | string }}"
|
||||||
volumes:
|
volumes:
|
||||||
- minecraft:/data
|
- minecraft:/data
|
||||||
|
- /etc/timezone:/etc/timezone:ro
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "mc-health"]
|
test: ["CMD", "mc-health"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
eula: true
|
motd: A minecraft server
|
||||||
|
user: "1000:1000"
|
||||||
|
eula: false
|
||||||
server_type: PAPER
|
server_type: PAPER
|
||||||
server_version: "1.21"
|
server_version: "1.21"
|
||||||
online_mode: false
|
online_mode: false
|
||||||
server_name: Minecraft Server
|
server_name: Minecraft Server
|
||||||
difficulty: hard
|
difficulty: hard
|
||||||
tz: Asia/Yekaterinburg
|
max_players: 20
|
||||||
|
use_simd_flags: false
|
||||||
|
|
Loading…
Reference in a new issue