From 5edd82486b8ae2a1ed4486672be1ff0746eaffb1 Mon Sep 17 00:00:00 2001 From: binary Date: Fri, 20 Nov 2020 16:54:36 +0100 Subject: Enable eula. --- roles/minecraft/tasks/main.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/roles/minecraft/tasks/main.yml b/roles/minecraft/tasks/main.yml index bbb6202..1b9142e 100644 --- a/roles/minecraft/tasks/main.yml +++ b/roles/minecraft/tasks/main.yml @@ -9,10 +9,11 @@ group: "{{ minecraft_user }}" - name: create minecraft directory - file: + file: path: "{{ minecraft_dir }}" owner: "{{ minecraft_user }}" group: "{{ minecraft_user }}" + mode: 0700 state: directory - name: download minecraft server @@ -22,7 +23,9 @@ owner: "{{ minecraft_user }}" - name: enable eula - shell: echo "eula=true" >> eula.txt - chdir: "{{ minecraft_dir }}" + lineinfile: + file: "{{ minecraft_dir }}/eula.txt" + regexp: "^eula=false" + line: eula=true become: true become_user: "{{ minecraft_user }}" -- cgit v1.2.3