Skip to content

Instantly share code, notes, and snippets.

@rdhyee
Created October 16, 2013 17:15
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save rdhyee/66f1aa40b6ea520c9e6e to your computer and use it in GitHub Desktop.
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)
- 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