Ansible configuration for a Minecraft server
Stealing everything from here: https://github.com/chadgeary/minecraft
sudo apt update && sudo apt install -y ansible
Make sure host_vars/aws
has the correct server info and then run:
ansible-playbook -i hosts minecraft.yml
Update and restart service:
ansible-playbook -i hosts minecraft.yml --extra-vars "mc_update=True"
The get_url
ansible task isn't working for some reason. It seems like the
Minecraft download page is blocking script access? I can instead go to the page
in a browser and copy the direct download link manually. Then run the following
on the server:
sudo curl <url> --output /opt/minecraft/server/server.jar
Then run the deploy command above.