Add Minecraft serbers
This commit is contained in:
parent
0241a1db36
commit
8a6a53ff6e
@ -1,15 +1,23 @@
|
|||||||
#!/usr/bin/env ansible-playbook
|
#!/usr/bin/env ansible-playbook
|
||||||
# vim:ft=ansible:
|
# vim:ft=ansible:
|
||||||
---
|
---
|
||||||
- hosts: terraria.9iron.club
|
- hosts: game1.9iron.club
|
||||||
roles:
|
roles:
|
||||||
- role: terraria
|
- role: minecraft
|
||||||
vars:
|
vars:
|
||||||
terraria_name: "1401-farm-master1"
|
mcname: "rotary-main"
|
||||||
terraria_password: "dicks"
|
mczip: "https://www.9iron.club/files/rotarypack-server.zip"
|
||||||
terraria_worldsize: 3
|
mcforge: "1.7.10-10.13.4.1614-1.7.10"
|
||||||
terraria_motd: "New major release edition"
|
mcmotd: "We hate ourselves edition"
|
||||||
terraria_worldname: "Farman - Master 1"
|
mcport: 25565
|
||||||
terraria_port: 7779
|
mcgamemode: 0
|
||||||
terraria_difficulty: 3
|
tags: [ gameserver, minecraft ]
|
||||||
tags: [ gameserver, terraria ]
|
- role: minecraft
|
||||||
|
vars:
|
||||||
|
mcname: "rotary-test"
|
||||||
|
mczip: "https://www.9iron.club/files/rotarypack-server.zip"
|
||||||
|
mcforge: "1.7.10-10.13.4.1614-1.7.10"
|
||||||
|
mcmotd: "We hate doing things in survival edition"
|
||||||
|
mcport: 25566
|
||||||
|
mcgamemode: 0
|
||||||
|
tags: [ gameserver, minecraft ]
|
||||||
|
4
inventory/group_vars/gameservers.yml
Normal file
4
inventory/group_vars/gameservers.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/ansible-playbook
|
||||||
|
# vim:ft=ansible:
|
||||||
|
mcheapmax: 4096
|
||||||
|
mcheapmin: 1024
|
@ -12,4 +12,4 @@ all:
|
|||||||
9iron.club:
|
9iron.club:
|
||||||
gameservers:
|
gameservers:
|
||||||
hosts:
|
hosts:
|
||||||
terraria.9iron.club:
|
game1.9iron.club:
|
||||||
|
@ -5,3 +5,5 @@ mcmotd: "An Ansible-deployed Minecraft server"
|
|||||||
mcleveltype: "default"
|
mcleveltype: "default"
|
||||||
mcgensettings: ""
|
mcgensettings: ""
|
||||||
mcgamemode: 0
|
mcgamemode: 0
|
||||||
|
mcheapmax: 3072
|
||||||
|
mcheapmin: 512
|
||||||
|
@ -22,14 +22,14 @@ ProtectKernelModules=true
|
|||||||
# Implies MountAPIVFS=yes
|
# Implies MountAPIVFS=yes
|
||||||
ProtectControlGroups=true
|
ProtectControlGroups=true
|
||||||
|
|
||||||
ExecStart=/bin/sh -c '/usr/bin/screen -DmS mc-%i /usr/bin/java -Xms512M -Xmx3072M -jar server.jar nogui'
|
ExecStart=/bin/sh -c '/usr/bin/screen -DmS %i /usr/bin/java -Xms{{ mcheapmin }}M -Xmx{{ mcheapmax }}M -jar server.jar nogui'
|
||||||
|
|
||||||
ExecReload=/usr/bin/screen -p 0 -S mc-%i -X eval 'stuff "reload"\\015'
|
ExecReload=/usr/bin/screen -p 0 -S %i -X eval 'stuff "reload"\\015'
|
||||||
|
|
||||||
ExecStop=/usr/bin/screen -p 0 -S mc-%i -X eval 'stuff "say Server is going down: Service was stopped"\\015'
|
ExecStop=/usr/bin/screen -p 0 -S %i -X eval 'stuff "say Server is going down: Service was stopped"\\015'
|
||||||
ExecStop=/usr/bin/screen -p 0 -S mc-%i -X eval 'stuff "save-all"\\015'
|
ExecStop=/usr/bin/screen -p 0 -S %i -X eval 'stuff "save-all"\\015'
|
||||||
ExecStop=/usr/bin/screen -p 0 -S mc-%i -X eval 'stuff "stop"\\015'
|
ExecStop=/usr/bin/screen -p 0 -S %i -X eval 'stuff "stop"\\015'
|
||||||
ExecStop=/bin/sleep 10
|
ExecStop=/bin/sleep 5
|
||||||
|
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user