src.nth.io/

summaryrefslogtreecommitdiff
path: root/minecraft/server/tasks/main.yaml
diff options
context:
space:
mode:
authorLuke Hoersten <[email protected]>2026-07-31 14:31:51 -0500
committerLuke Hoersten <[email protected]>2026-07-31 14:31:51 -0500
commit8fa841b96947c05196cd3b102e3d2b68b7352a42 (patch)
treec5d4fba80451e3e605caf9173c38f76efff9bba4 /minecraft/server/tasks/main.yaml
parent846782c44c1c65e7b755de76fd50d86fc7c9636e (diff)
minecraft: papermc fill v3 api and jar checksum
The v2 api was sunset july 2026 (http 410). Fill v3 returns the download url and sha256 directly. Passing the checksum to get_url also makes version bumps take effect: without it the download was skipped whenever server.jar existed.
Diffstat (limited to 'minecraft/server/tasks/main.yaml')
-rw-r--r--minecraft/server/tasks/main.yaml9
1 files changed, 7 insertions, 2 deletions
diff --git a/minecraft/server/tasks/main.yaml b/minecraft/server/tasks/main.yaml
index c91d575..c6922d1 100644
--- a/minecraft/server/tasks/main.yaml
+++ b/minecraft/server/tasks/main.yaml
@@ -17,16 +17,21 @@
mode: "0755"
state: "directory"
+# papermc sunset the v2 api in july 2026; fill v3 returns the download url
+# and sha256 directly.
- name: get minecraft download info
uri:
- url: "https://api.papermc.io/v2/projects/paper/versions/{{minecraft_paper_version}}/builds/{{minecraft_paper_build}}"
+ url: "https://fill.papermc.io/v3/projects/paper/versions/{{minecraft_paper_version}}/builds/{{minecraft_paper_build}}"
return_content: yes
register: minecraft_build_info
+# The checksum makes version bumps take effect: without it, get_url skips
+# the download whenever server.jar already exists.
- name: download minecraft
become: yes
get_url:
- url: "https://fill-data.papermc.io/v1/objects/{{minecraft_build_info.json.downloads.application.sha256}}/paper-{{minecraft_paper_version}}-{{minecraft_paper_build}}.jar"
+ url: "{{minecraft_build_info.json.downloads['server:default'].url}}"
+ checksum: "sha256:{{minecraft_build_info.json.downloads['server:default'].checksums.sha256}}"
dest: "{{minecraft_dir}}/server.jar"
mode: "0755"
notify: restart minecraft