aboutsummaryrefslogtreecommitdiffstats
path: root/roles/minecraft/tasks/main.yml
blob: 1b9142e3df9efdb4cb5e1b33d416c6fd9f9ec174 (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
29
30
31

# 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 }}"
    mode: 0700
    state: directory

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

- name: enable eula
  lineinfile:
    file: "{{ minecraft_dir }}/eula.txt"
    regexp: "^eula=false"
    line: eula=true
  become: true
  become_user: "{{ minecraft_user }}"
remember that computers suck.