homelab/roles/minecraft/tasks/system.yml

27 lines
684 B
YAML
Raw Normal View History

- name: Install Screen
2023-05-04 03:42:55 +00:00
ansible.builtin.apt:
name: screen
state: present
- name: Create Minecraft user
2023-05-04 03:42:55 +00:00
ansible.builtin.user:
name: "{{ minecraft_user }}"
state: present
2023-05-04 03:42:55 +00:00
ansible.builtin.shell: /bin/bash
- name: Create Minecraft directory
2023-05-04 03:42:55 +00:00
ansible.builtin.file:
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:
src: eula.txt.j2
dest: "{{ minecraft_home }}/{{ item.name }}/eula.txt"
owner: "{{ minecraft_user }}"
group: "{{ minecraft_user }}"
loop: "{{ minecraft }}"