-
-
Save rdhyee/66f1aa40b6ea520c9e6e to your computer and use it in GitHub Desktop.
Ansible playbook to implement instructions in "How To Set Up a Minecraft Server on Linux" (https://www.digitalocean.com/community/articles/how-to-set-up-a-minecraft-server-on-linux)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: minecraft_do | |
# https://www.digitalocean.com/community/articles/how-to-set-up-a-minecraft-server-on-linux | |
tasks: | |
- name: do apt-get update --fix-missing | |
command: apt-get update --fix-missing | |
sudo: yes | |
- name: install java | |
apt: pkg=default-jdk | |
sudo: yes | |
- name: install screen | |
apt: pkg=screen | |
sudo: yes | |
- name: make the minecraft directory | |
file: state=directory path=/root/minecraft | |
- name: download minecraft (1.6.4) | |
command: wget https://s3.amazonaws.com/Minecraft.Download/versions/1.6.4/minecraft_server.1.6.4.jar chdir=/root/minecraft creates=/root/minecraft/minecraft_server.1.6.4.jar | |
sudo: yes | |
- name: run minecraft | |
command: screen -S minecraft -d -m java -Xmx512M -Xms512M -jar /root/minecraft/minecraft_server.1.6.4.jar | |
sudo: yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment