2021-06-17 02:49:01 +00:00
|
|
|
- name: Install Screen
|
2023-05-04 03:42:55 +00:00
|
|
|
ansible.builtin.apt:
|
2021-06-17 02:49:01 +00:00
|
|
|
name: screen
|
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: Create Minecraft user
|
2023-05-04 03:42:55 +00:00
|
|
|
ansible.builtin.user:
|
2021-06-17 02:49:01 +00:00
|
|
|
name: "{{ minecraft_user }}"
|
|
|
|
state: present
|
2023-05-04 03:42:55 +00:00
|
|
|
ansible.builtin.shell: /bin/bash
|
2021-06-17 02:49:01 +00:00
|
|
|
|
|
|
|
- name: Create Minecraft directory
|
2023-05-04 03:42:55 +00:00
|
|
|
ansible.builtin.file:
|
2021-06-17 02:49:01 +00:00
|
|
|
path: "{{ minecraft_home }}/{{ item.name }}"
|
|
|
|
state: directory
|
|
|
|
owner: "{{ minecraft_user }}"
|
|
|
|
group: "{{ minecraft_user }}"
|
|
|
|
loop: "{{ minecraft }}"
|
|
|
|
|
|
|
|
- name: Answer to Mojang's EULA
|
2023-05-04 03:42:55 +00:00
|
|
|
ansible.builtin.template:
|
2021-06-17 02:49:01 +00:00
|
|
|
src: eula.txt.j2
|
|
|
|
dest: "{{ minecraft_home }}/{{ item.name }}/eula.txt"
|
|
|
|
owner: "{{ minecraft_user }}"
|
|
|
|
group: "{{ minecraft_user }}"
|
|
|
|
loop: "{{ minecraft }}"
|