update
Some checks failed
Deploy Minecraft Server / deploy (push) Failing after 1m25s
Ansible Lint / lint (push) Failing after 12s

This commit is contained in:
2025-08-26 14:28:09 +02:00
parent 0315edf95f
commit 31711c7627
105 changed files with 1419 additions and 366 deletions

View File

@@ -0,0 +1,4 @@
---
java_version: 21
java_package: "openjdk-{{ java_version }}-jdk"
java_home: "/usr/lib/jvm/java-{{ java_version }}-openjdk-amd64"

View File

@@ -0,0 +1,7 @@
---
- name: Check if Java is already installed
command: java -version
register: java_check
failed_when: false
changed_when: false
tags: ['java-check']

View File

@@ -0,0 +1,6 @@
---
- name: Install OpenJDK
package:
name: "{{ java_package }}"
state: present
tags: ['java-install']

View File

@@ -0,0 +1,6 @@
--
- name: Verify Java installation
command: java -version
register: java_verify
changed_when: false
tags: ['java-verify']

View File

@@ -0,0 +1,7 @@
---
- name: Set Java home environment variable
lineinfile:
path: /etc/environment
line: "JAVA_HOME={{ java_home }}"
state: present
tags: ['java-validate']

View File

@@ -0,0 +1,17 @@
---
- name: Include Java check tasks
include_tasks: 01-check-java.yml
tags: ['java', 'check']
- name: Include Java installation tasks
include_tasks: 02-install-java.yml
when: java_installed is not defined or not java_installed
tags: ['java', 'install']
- name: Include Java verification tasks
include_tasks: 03-verify-java.yml
tags: ['java', 'verify']
- name: Include Java validation tasks
include_tasks: 04-validate-installation.yml
tags: ['java', 'validate']

View File