mirror of
https://github.com/fscotto/infra.git
synced 2026-09-27 19:03:47 +00:00
Handle Maven on Mise
This commit is contained in:
@@ -8,9 +8,10 @@ workstation_dev_wsl_packages:
|
|||||||
- python3-pip
|
- python3-pip
|
||||||
- tmux
|
- tmux
|
||||||
|
|
||||||
# Java 11 is no longer supplied by the Fedora repositories used by this WSL
|
# Java 11 and Maven are managed by Mise on this Fedora WSL profile. Keep their
|
||||||
# profile. Keep the JDK patch pinned; update this value deliberately.
|
# versions pinned; update them deliberately.
|
||||||
workstation_mise_java_version: temurin-11.0.31+11
|
workstation_mise_java_version: temurin-11.0.31+11
|
||||||
|
workstation_mise_maven_version: 3.9.16
|
||||||
|
|
||||||
workstation_is_wsl: true
|
workstation_is_wsl: true
|
||||||
workstation_wsl_systemd_enabled: true
|
workstation_wsl_systemd_enabled: true
|
||||||
|
|||||||
@@ -66,14 +66,27 @@
|
|||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
|
||||||
- name: Install the pinned Java version with Mise
|
- name: Check whether the pinned Maven version is installed with Mise
|
||||||
tags: [packages, mise, java, wsl]
|
tags: [packages, mise, maven, wsl]
|
||||||
|
ansible.builtin.command:
|
||||||
|
cmd: "mise where maven@{{ workstation_mise_maven_version }}"
|
||||||
|
become_user: "{{ username }}"
|
||||||
|
environment:
|
||||||
|
HOME: "{{ user_home }}"
|
||||||
|
register: workstation_mise_maven_where
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
|
||||||
|
- name: Install the pinned Mise tools
|
||||||
|
tags: [packages, mise, java, maven, wsl]
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
cmd: mise install
|
cmd: mise install
|
||||||
become_user: "{{ username }}"
|
become_user: "{{ username }}"
|
||||||
environment:
|
environment:
|
||||||
HOME: "{{ user_home }}"
|
HOME: "{{ user_home }}"
|
||||||
when: workstation_mise_java_where.rc != 0
|
when: >-
|
||||||
|
workstation_mise_java_where.rc != 0 or
|
||||||
|
workstation_mise_maven_where.rc != 0
|
||||||
|
|
||||||
- name: Ensure WSL boot configuration file exists
|
- name: Ensure WSL boot configuration file exists
|
||||||
tags: [packages, services]
|
tags: [packages, services]
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
[tools]
|
[tools]
|
||||||
java = "temurin-11.0.31+11"
|
java = "temurin-11.0.31+11"
|
||||||
|
maven = "3.9.16"
|
||||||
|
|||||||
Reference in New Issue
Block a user