Files
Ansible-Minecraft-Server/roles/05-update/tasks/05-compile-new-version.yml
hcornet 9ea9ac7254
Some checks failed
Ansible Minecraft Server CI/CD / lint (push) Failing after 21s
Ansible Minecraft Server CI/CD / test (push) Has been skipped
Ansible Minecraft Server CI/CD / deploy (push) Has been skipped
check new version
2025-08-27 07:59:19 +02:00

25 lines
726 B
YAML

---
- name: Compile new Spigot version
ansible.builtin.command:
cmd: "java -jar BuildTools.jar --rev {{ minecraft_version }}"
chdir: "{{ spigot_update_dir }}"
become_user: "{{ minecraft_user }}"
register: compile_result
- name: Verify compilation success
ansible.builtin.stat:
path: "{{ spigot_update_dir }}/spigot-{{ minecraft_version }}.jar"
register: new_jar
- name: Set update ready flag
ansible.builtin.set_fact:
spigot_update_ready: "{{ new_jar.stat.exists }}"
- name: Create staging directory
ansible.builtin.file:
path: "{{ update_staging_dir }}"
state: directory
owner: "{{ minecraft_user }}"
group: "{{ minecraft_group }}"
mode: '0755'
when: spigot_update_ready