Compare commits
No commits in common. "d325f47cd9ec871bbbffb546c7fbc97274bd2b03" and "0214e6bd75b96fb7126e7a3aed49efa42dab0702" have entirely different histories.
d325f47cd9
...
0214e6bd75
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +0,0 @@
|
||||
*.swp
|
@ -1,48 +0,0 @@
|
||||
#!/usr/bin/ansible-playbook
|
||||
# vim:ft=ansible:
|
||||
---
|
||||
- name: set up forge
|
||||
block:
|
||||
- name: template out modpack installer
|
||||
template: src=install-modpack.sh dest={{ minecraft_home }}/{{ minecraft_name }}/install-modpack.sh mode="0755"
|
||||
- name: download forge
|
||||
get_url: dest={{ minecraft_home }}/{{ minecraft_name }}/installer.jar url={{ minecraft_forge_downloadurl }}
|
||||
register: download_forge
|
||||
- name: install forge
|
||||
command:
|
||||
chdir: "{{ minecraft_home }}/{{ minecraft_name }}"
|
||||
argv: [ "/usr/bin/java", "-jar", "./installer.jar", "--installServer" ]
|
||||
notify: restart minecraft {{ minecraft_name }}
|
||||
when: download_forge is changed
|
||||
- name: link to forge jar
|
||||
file: path={{ minecraft_home }}/{{ minecraft_name }}/server.jar src={{ minecraft_forge_jar_name }} state=link
|
||||
- name: install modpack
|
||||
block:
|
||||
- name: download modpack
|
||||
get_url: dest={{ minecraft_home }}/{{ minecraft_name }}/modpack.zip url={{ minecraft_forge_packurl }}
|
||||
register: download_modpack
|
||||
- name: install modpack
|
||||
block:
|
||||
- name: assure modpack unzip directory
|
||||
file: path={{ minecraft_home }}/{{ minecraft_name }}/modpack state=directory
|
||||
- name: unpack zip
|
||||
unarchive: src={{ minecraft_home }}/{{ minecraft_name }}/modpack.zip dest={{ minecraft_home }}/{{ minecraft_name }}/modpack remote_src=yes
|
||||
- name: run installer
|
||||
command:
|
||||
chdir: "{{ minecraft_home }}/{{ minecraft_name }}"
|
||||
argv: [ "bash", "./install-modpack.sh" ]
|
||||
notify: "restart minecraft {{ minecraft_name }}"
|
||||
when: download_modpack is changed
|
||||
when: minecraft_forge_packurl is defined
|
||||
- name: install mods
|
||||
get_url: dest="{{ minecraft_home }}/{{ minecraft_name }}/mods" url={{ item }}
|
||||
loop: "{{ minecraft_forge_mods }}"
|
||||
notify: "restart minecraft {{ minecraft_name }}"
|
||||
when: minecraft_forge_mods is iterable and minecraft_forge_mods != None
|
||||
- name: remove mods
|
||||
file: path={{ minecraft_home }}/{{ minecraft_name }}/mods/{{ item }} state=absent
|
||||
loop: "{{ minecraft_forge_mods_remove }}"
|
||||
notify: "restart minecraft {{ minecraft_name }}"
|
||||
when: minecraft_forge_mods_remove is iterable and minecraft_forge_mods_remove != None
|
||||
become: yes
|
||||
become_user: minecraft
|
@ -30,16 +30,61 @@
|
||||
notify: "restart minecraft {{ minecraft_name }}"
|
||||
become: yes
|
||||
become_user: minecraft
|
||||
|
||||
# Paper - A vanilla server with plugin support
|
||||
- name: set up paper
|
||||
include_tasks: paper.yml
|
||||
block:
|
||||
- name: download paper
|
||||
get_url: url={{ minecraft_paper_downloadurl }} dest={{ minecraft_home }}/{{ minecraft_name }}/server.jar
|
||||
notify: "restart minecraft {{ minecraft_name }}"
|
||||
# TODO: Manage configs for plugins, auto-install plugins
|
||||
become: yes
|
||||
become_user: minecraft
|
||||
when: minecraft_paper_install
|
||||
# Forge - Server- and client-side modloader
|
||||
- name: set up forge
|
||||
include_tasks: forge.yml
|
||||
block:
|
||||
- name: template out modpack installer
|
||||
template: src=install-modpack.sh dest={{ minecraft_home }}/{{ minecraft_name }}/install-modpack.sh mode="0755"
|
||||
- name: download forge
|
||||
get_url: dest={{ minecraft_home }}/{{ minecraft_name }}/installer.jar url={{ minecraft_forge_downloadurl }}
|
||||
register: download_forge
|
||||
- name: install forge
|
||||
command:
|
||||
chdir: "{{ minecraft_home }}/{{ minecraft_name }}"
|
||||
argv: [ "/usr/bin/java", "-jar", "./installer.jar", "--installServer" ]
|
||||
notify: restart minecraft {{ minecraft_name }}
|
||||
when: download_forge is changed
|
||||
- name: link to forge jar
|
||||
file: path={{ minecraft_home }}/{{ minecraft_name }}/server.jar src={{ minecraft_forge_jar_name }} state=link
|
||||
- name: install modpack
|
||||
block:
|
||||
- name: download modpack
|
||||
get_url: dest={{ minecraft_home }}/{{ minecraft_name }}/modpack.zip url={{ minecraft_forge_packurl }}
|
||||
register: download_modpack
|
||||
- name: install modpack
|
||||
block:
|
||||
- name: assure modpack unzip directory
|
||||
file: path={{ minecraft_home }}/{{ minecraft_name }}/modpack state=directory
|
||||
- name: unpack zip
|
||||
unarchive: src={{ minecraft_home }}/{{ minecraft_name }}/modpack.zip dest={{ minecraft_home }}/{{ minecraft_name }}/modpack remote_src=yes
|
||||
- name: run installer
|
||||
command:
|
||||
chdir: "{{ minecraft_home }}/{{ minecraft_name }}"
|
||||
argv: [ "bash", "./install-modpack.sh" ]
|
||||
notify: "restart minecraft {{ minecraft_name }}"
|
||||
when: download_modpack is changed
|
||||
when: minecraft_forge_packurl is defined
|
||||
- name: install mods
|
||||
get_url: dest="{{ minecraft_home }}/{{ minecraft_name }}/mods" url={{ item }}
|
||||
loop: "{{ minecraft_forge_mods }}"
|
||||
notify: "restart minecraft {{ minecraft_name }}"
|
||||
when: minecraft_forge_mods is iterable and minecraft_forge_mods != None
|
||||
- name: remove mods
|
||||
file: path={{ minecraft_home }}/{{ minecraft_name }}/mods/{{ item }} state=absent
|
||||
loop: "{{ minecraft_forge_mods_remove }}"
|
||||
notify: "restart minecraft {{ minecraft_name }}"
|
||||
when: minecraft_forge_mods_remove is iterable and minecraft_forge_mods_remove != None
|
||||
become: yes
|
||||
become_user: minecraft
|
||||
when: minecraft_forge_install and minecraft_forge_version is defined
|
||||
|
||||
- name: enable service
|
||||
systemd: name=minecraft@{{ minecraft_name }}.service enabled=yes state=started
|
||||
when: minecraft_enabled
|
||||
|
@ -1,11 +0,0 @@
|
||||
#!/usr/bin/ansible-playbook
|
||||
# vim:ft=ansible:
|
||||
---
|
||||
- name: set up paper
|
||||
block:
|
||||
- name: download paper
|
||||
get_url: url={{ minecraft_paper_downloadurl }} dest={{ minecraft_home }}/{{ minecraft_name }}/server.jar
|
||||
notify: "restart minecraft {{ minecraft_name }}"
|
||||
# TODO: Manage configs for plugins, auto-install plugins
|
||||
become: yes
|
||||
become_user: minecraft
|
Loading…
Reference in New Issue
Block a user