Polish up that Terraria role some more
This commit is contained in:
parent
c514fb4183
commit
6e1bf6a467
7
ec2.yml
7
ec2.yml
@ -90,9 +90,12 @@
|
|||||||
vars:
|
vars:
|
||||||
terraria_name: "vanilla1"
|
terraria_name: "vanilla1"
|
||||||
terraria_zip: "https://terraria.org/server/terraria-server-1344.zip"
|
terraria_zip: "https://terraria.org/server/terraria-server-1344.zip"
|
||||||
terraria_port: "7777"
|
|
||||||
terraria_worldsize: "large"
|
|
||||||
terraria_password: "dicks"
|
terraria_password: "dicks"
|
||||||
|
terraria_worldsize: 3
|
||||||
|
terraria_motd: "New major release edition"
|
||||||
|
terraria_worldname: "Blitzballs"
|
||||||
|
terraria_port: 7777
|
||||||
|
terraria_difficulty: 1
|
||||||
- hosts: tag_minecraft_ultreload
|
- hosts: tag_minecraft_ultreload
|
||||||
roles:
|
roles:
|
||||||
- role: backups
|
- role: backups
|
||||||
|
@ -1 +1,6 @@
|
|||||||
|
terraria_difficulty: 0
|
||||||
|
terraria_motd: "Please don't cut the purple trees!"
|
||||||
|
terraria_port: 7777
|
||||||
terraria_root: "/var/terraria"
|
terraria_root: "/var/terraria"
|
||||||
|
terraria_worldname: "World"
|
||||||
|
terraria_worldsize: 3
|
||||||
|
@ -55,6 +55,12 @@
|
|||||||
dest: "{{ terraria_root }}/{{ terraria_name }}"
|
dest: "{{ terraria_root }}/{{ terraria_name }}"
|
||||||
- name: Move zip contents
|
- name: Move zip contents
|
||||||
shell: mv "{{ terraria_root }}/{{ terraria_name }}/Dedicated Server/*" "{{ terraria_root }}/{{ terraria_name }}"
|
shell: mv "{{ terraria_root }}/{{ terraria_name }}/Dedicated Server/*" "{{ terraria_root }}/{{ terraria_name }}"
|
||||||
|
- name: Create worlds directory
|
||||||
|
file:
|
||||||
|
path: "{{ terraria_root }}/{{ terraria_name }}/worlds"
|
||||||
|
owner: terraria
|
||||||
|
group: ter-admin
|
||||||
|
state: directory
|
||||||
when: not stat_server_binary.stat.exists
|
when: not stat_server_binary.stat.exists
|
||||||
- name: Configure server
|
- name: Configure server
|
||||||
block:
|
block:
|
||||||
|
13
roles/terraria/templates/config
Normal file
13
roles/terraria/templates/config
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# This configuration file is deployed via Ansible
|
||||||
|
# Changes made here will be overwritten!
|
||||||
|
maxplayers=8
|
||||||
|
world={{ terraria_root }}/{{ terraria_name }}/worlds/world.wld
|
||||||
|
port={{ terraria_port }}
|
||||||
|
password={{ terraria_password }}
|
||||||
|
motd={{ terraria_motd }}
|
||||||
|
worldpath={{ terraria_root }}/{{ terraria_name }}/worlds
|
||||||
|
autocreate={{ terraria_worldsize }}
|
||||||
|
difficulty={{ terraria_difficulty }}
|
||||||
|
worldname={{ terraria_worldname }}
|
||||||
|
banlist=banlist.txt
|
||||||
|
secure=1
|
@ -21,7 +21,7 @@ ProtectKernelModules=true
|
|||||||
# Implies MountAPIVFS=yes
|
# Implies MountAPIVFS=yes
|
||||||
ProtectControlGroups=true
|
ProtectControlGroups=true
|
||||||
|
|
||||||
ExecStart=/bin/sh -c '/usr/bin/screen -DmS ter-%i ./TerrariaServer.bin.x86_64'
|
ExecStart=/bin/sh -c '/usr/bin/screen -DmS ter-%i ./TerrariaServer.bin.x86_64 -c ./config'
|
||||||
|
|
||||||
ExecStop=/usr/bin/screen -p 0 -S ter-%i -X eval 'stuff "say Server is going down: Service was stopped"\\015'
|
ExecStop=/usr/bin/screen -p 0 -S ter-%i -X eval 'stuff "say Server is going down: Service was stopped"\\015'
|
||||||
ExecStop=/usr/bin/screen -p 0 -S ter-%i -X eval 'stuff "exit"\\015'
|
ExecStop=/usr/bin/screen -p 0 -S ter-%i -X eval 'stuff "exit"\\015'
|
||||||
|
Loading…
Reference in New Issue
Block a user