Add Minecraft
parent
64aa4addec
commit
dd2292bb76
4
all.yml
4
all.yml
|
@ -51,3 +51,7 @@
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
- couchdb
|
- couchdb
|
||||||
|
- role: minecraft
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
- minecraft
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
---
|
||||||
|
- name: Create minecraft directory
|
||||||
|
file:
|
||||||
|
path: "{{ minecraft_folder_name }}"
|
||||||
|
state: directory
|
||||||
|
owner: "{{ base_user_name }}"
|
||||||
|
group: "{{ base_user_name }}"
|
||||||
|
mode: 0755
|
||||||
|
|
||||||
|
- name: Copy minecraft Compose file
|
||||||
|
template:
|
||||||
|
src: docker-compose.yml.j2
|
||||||
|
# Remove .j2 extension
|
||||||
|
dest: "{{ minecraft_folder_name }}/docker-compose.yml"
|
||||||
|
owner: "{{ base_user_name }}"
|
||||||
|
group: "{{ base_user_name }}"
|
||||||
|
mode: 0644
|
||||||
|
|
||||||
|
- name: Ensure container is up to date
|
||||||
|
community.docker.docker_compose:
|
||||||
|
project_src: "{{ minecraft_folder_name }}"
|
||||||
|
remove_orphans: yes
|
||||||
|
pull: yes
|
||||||
|
recreate: smart
|
||||||
|
state: present
|
|
@ -0,0 +1,22 @@
|
||||||
|
version: "{{ compose_version }}"
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
data:
|
||||||
|
name: minecraft_data
|
||||||
|
|
||||||
|
services:
|
||||||
|
lychee:
|
||||||
|
container_name: minecraft
|
||||||
|
image: "itzg/minecraft-server"
|
||||||
|
environment:
|
||||||
|
TYPE: "PAPER"
|
||||||
|
EULA: "TRUE"
|
||||||
|
SNOOPER_ENABLED: false
|
||||||
|
DIFFICULTY: "normal"
|
||||||
|
MOTD: "Le gentil serveur de Momo Pierre et Quentin"
|
||||||
|
ports:
|
||||||
|
- "25565:25565"
|
||||||
|
volumes:
|
||||||
|
- data:/data
|
||||||
|
- /etc/timezone:/etc/timezone:ro
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
|
@ -0,0 +1 @@
|
||||||
|
minecraft_folder_name: "{{ docker_files }}/minecraft"
|
Loading…
Reference in New Issue