aboutsummaryrefslogtreecommitdiffstats
path: root/roles/minecraft/tasks/main.yml
blob: bbb62023530231b4f10be1012b18fce8938021f1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

# minecraft ~~ tasks/main.yml

---

- name: create minecraft user
  user:
    name: "{{ minecraft_user }}"
    group: "{{ minecraft_user }}"

- name: create minecraft directory
  file: 
    path: "{{ minecraft_dir }}"
    owner: "{{ minecraft_user }}"
    group: "{{ minecraft_user }}"
    state: directory

- name: download minecraft server
  get_url:
    url: "{{ minecraft_url }}"
    dest: "{{ minecraft_dir }}/{{ minecraft_bin }}"
    owner: "{{ minecraft_user }}"

- name: enable eula
  shell: echo "eula=true" >> eula.txt
  chdir: "{{ minecraft_dir }}"
  become: true
  become_user: "{{ minecraft_user }}"
remember that computers suck.