2021-01-01 15:09:53 +00:00
|
|
|
---
|
|
|
|
- hosts: teier.eu
|
|
|
|
gather_facts: no
|
|
|
|
tasks:
|
|
|
|
- name: Check dc directory
|
|
|
|
stat:
|
|
|
|
path: /dc/minecraft
|
|
|
|
register: minecraft_dc_dir_stat
|
|
|
|
|
|
|
|
- name: Create minecraft dc directory
|
|
|
|
file:
|
|
|
|
path: /dc/minecraft
|
|
|
|
state: directory
|
|
|
|
mode: 0755
|
|
|
|
group: root
|
|
|
|
owner: root
|
|
|
|
when: minecraft_dc_dir_stat.islnk is not defined
|
|
|
|
|
|
|
|
- name: Copy server.jar
|
|
|
|
copy:
|
|
|
|
src: server.jar
|
|
|
|
dest: /dc/minecraft/
|
|
|
|
|
|
|
|
- name: Copy properties template
|
|
|
|
copy:
|
|
|
|
src: server.template.properties
|
|
|
|
dest: /dc/minecraft/
|
|
|
|
|
|
|
|
- name: Copy EULA
|
|
|
|
copy:
|
|
|
|
src: eula.txt
|
|
|
|
dest: /dc/minecraft/
|
|
|
|
|
|
|
|
- name: Copy docker-entrypoint
|
|
|
|
copy:
|
|
|
|
src: docker-entrypoint.sh
|
|
|
|
dest: /dc/minecraft/
|
|
|
|
|
|
|
|
- name: Copy Dockerfile
|
|
|
|
copy:
|
|
|
|
src: Dockerfile
|
|
|
|
dest: /dc/minecraft/
|
|
|
|
|
|
|
|
- name: Copy compose file
|
|
|
|
copy:
|
|
|
|
src: docker-compose.yml
|
|
|
|
dest: /dc/minecraft/
|
|
|
|
|
|
|
|
- name: Start minecraft
|
2021-04-12 09:14:55 +00:00
|
|
|
shell: "cd /dc/minecraft && docker-compose up -d --build"
|
2021-01-01 15:09:53 +00:00
|
|
|
|