test other version
Some checks failed
Ansible Minecraft CI/CD Pipeline / Ansible Lint Check (push) Successful in 58s
Ansible Minecraft CI/CD Pipeline / Project Structure Validation (push) Failing after 3s
Ansible Minecraft CI/CD Pipeline / Security Scan (push) Successful in 4s
Ansible Minecraft CI/CD Pipeline / Deploy to Staging (push) Has been skipped
Ansible Minecraft CI/CD Pipeline / Deploy to Production (push) Has been skipped
Ansible Minecraft CI/CD Pipeline / Backup System Check (push) Has been skipped

This commit is contained in:
2025-08-26 21:59:21 +02:00
parent b2459a2dc0
commit 7a2ccb537b
98 changed files with 2830 additions and 1291 deletions

View File

@@ -1,38 +0,0 @@
---
- name: Compile new Spigot version
shell: |
cd {{ minecraft_sources_dir }}/build_{{ latest_spigot_version }}
java -jar BuildTools.jar --rev {{ latest_spigot_version }}
become_user: "{{ minecraft_user }}"
args:
creates: "{{ minecraft_sources_dir }}/build_{{ latest_spigot_version }}/spigot-{{ latest_spigot_version }}.jar"
register: spigot_compile_result
- name: Set compilation success flag
set_fact:
new_spigot_compiled: "{{ spigot_compile_result.rc == 0 }}"
- name: Create new server directory
file:
path: "{{ minecraft_server_dir }}_{{ latest_spigot_version }}"
state: directory
owner: "{{ minecraft_user }}"
group: "{{ minecraft_group }}"
mode: '0755'
when: new_spigot_compiled
- name: Copy new Spigot jar to new server directory
copy:
src: "{{ minecraft_sources_dir }}/build_{{ latest_spigot_version }}/spigot-{{ latest_spigot_version }}.jar"
dest: "{{ minecraft_server_dir }}_{{ latest_spigot_version }}/spigot.jar"
owner: "{{ minecraft_user }}"
group: "{{ minecraft_group }}"
mode: '0644'
remote_src: yes
when: new_spigot_compiled
- name: Copy configuration files to new server directory
shell: |
cp -r {{ minecraft_server_dir }}/* {{ minecraft_server_dir }}_{{ latest_spigot_version }}/
chown -R {{ minecraft_user }}:{{ minecraft_group }} {{ minecraft_server_dir }}_{{ latest_spigot_version }}
when: new_spigot_compiled