aboutsummaryrefslogblamecommitdiffstats
path: root/roles/minecraft/tasks/main.yml
blob: bbb62023530231b4f10be1012b18fce8938021f1 (plain) (tree)
1
2
3
4
5
6
7
8
9
10




                             
                             



                                 
                                  





                                 
                                 




                                                   



                                     
                                     

# 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.