Adding minecraft server infra, so when the server dev work is complete, it's all ready to go

This commit is contained in:
Ubergeek
2019-02-08 15:11:44 +00:00
parent 3386385459
commit f180c12f02
3 changed files with 50 additions and 2 deletions

View File

@@ -0,0 +1,29 @@
# Configure minecraft server
---
- name: Create home dirs for znc
file:
path: /var/lib/minecraft
state: directory
owner: minecraft
group: root
mode: 0770
recurse: yes
- name: Install minecraft target
copy:
dest: /etc/systemd/system/minecraft.service
content: |
[Install]
WantedBy=multi-user.target
[Unit]
Description=Minecraft Game Server
After=network-online.target
[Service]
ExecStart=
ExecReload=/bin/kill -HUP $MAINPID
User=znc
[Install]
WantedBy=multi-user.target