diff --git a/README.md b/README.md index 857429b..553f734 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Requirements * Fedora - * 35 + * 41 * SUSE Family diff --git a/meta/main.yml b/meta/main.yml index 05e7e4e..19de36d 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -11,7 +11,7 @@ galaxy_info: - '9' - name: Fedora versions: - - '35' + - '41' - name: opensuse versions: - 'all' diff --git a/molecule/fedora-java-min-online/molecule.yml b/molecule/fedora-java-min-online/molecule.yml index 015246a..6c29317 100644 --- a/molecule/fedora-java-min-online/molecule.yml +++ b/molecule/fedora-java-min-online/molecule.yml @@ -9,7 +9,7 @@ role_name_check: 2 platforms: - name: ansible-role-java-fedora - image: fedora:35 + image: fedora:41 provisioner: name: ansible diff --git a/molecule/java-max-lts-offline/converge.yml b/molecule/java-max-lts-offline/converge.yml index 950e373..fd7c19c 100644 --- a/molecule/java-max-lts-offline/converge.yml +++ b/molecule/java-max-lts-offline/converge.yml @@ -10,6 +10,13 @@ changed_when: false when: ansible_pkg_mgr == 'apt' + # Workaround for Fedora 41 https://github.com/ansible/ansible/issues/84206 + - name: Install python3-libdnf5 + become: true + ansible.builtin.command: dnf install -y python3-libdnf5 + when: ansible_facts.pkg_mgr == 'dnf5' + changed_when: false + - name: Create local archive directory ansible.builtin.file: state: directory @@ -44,7 +51,7 @@ - ansible_local.java.general.home is defined - name: Install find - required for tests (dnf) - ansible.builtin.dnf: + ansible.builtin.package: name: findutils state: present - when: ansible_pkg_mgr == 'dnf' + when: ansible_pkg_mgr in ('dnf', 'dnf5') diff --git a/molecule/java-max-lts-online/converge.yml b/molecule/java-max-lts-online/converge.yml index c8b49da..1fc85a2 100644 --- a/molecule/java-max-lts-online/converge.yml +++ b/molecule/java-max-lts-online/converge.yml @@ -10,6 +10,13 @@ changed_when: false when: ansible_pkg_mgr == 'apt' + # Workaround for Fedora 41 https://github.com/ansible/ansible/issues/84206 + - name: Install python3-libdnf5 + become: true + ansible.builtin.command: dnf install -y python3-libdnf5 + when: ansible_facts.pkg_mgr == 'dnf5' + changed_when: false + roles: - role: ansible-role-java java_use_local_archive: false @@ -22,7 +29,7 @@ - ansible_local.java.general.home is defined - name: Install find - required for tests (dnf) - ansible.builtin.dnf: + ansible.builtin.package: name: findutils state: present - when: ansible_pkg_mgr == 'dnf' + when: ansible_pkg_mgr in ('dnf', 'dnf5') diff --git a/molecule/java-max-non-lts-offline/converge.yml b/molecule/java-max-non-lts-offline/converge.yml index 1c3944d..7baeb40 100644 --- a/molecule/java-max-non-lts-offline/converge.yml +++ b/molecule/java-max-non-lts-offline/converge.yml @@ -10,6 +10,13 @@ changed_when: false when: ansible_pkg_mgr == 'apt' + # Workaround for Fedora 41 https://github.com/ansible/ansible/issues/84206 + - name: Install python3-libdnf5 + become: true + ansible.builtin.command: dnf install -y python3-libdnf5 + when: ansible_facts.pkg_mgr == 'dnf5' + changed_when: false + - name: Create local archive directory ansible.builtin.file: state: directory @@ -43,7 +50,7 @@ - ansible_local.java.general.home is defined - name: Install find - required for tests (dnf) - ansible.builtin.dnf: + ansible.builtin.package: name: findutils state: present - when: ansible_pkg_mgr == 'dnf' + when: ansible_pkg_mgr in ('dnf', 'dnf5') diff --git a/molecule/java-max-non-lts-online/converge.yml b/molecule/java-max-non-lts-online/converge.yml index f810555..ac2a186 100644 --- a/molecule/java-max-non-lts-online/converge.yml +++ b/molecule/java-max-non-lts-online/converge.yml @@ -10,6 +10,13 @@ changed_when: false when: ansible_pkg_mgr == 'apt' + # Workaround for Fedora 41 https://github.com/ansible/ansible/issues/84206 + - name: Install python3-libdnf5 + become: true + ansible.builtin.command: dnf install -y python3-libdnf5 + when: ansible_facts.pkg_mgr == 'dnf5' + changed_when: false + roles: - role: ansible-role-java java_version: '20' @@ -23,7 +30,7 @@ - ansible_local.java.general.home is defined - name: Install find - required for tests (dnf) - ansible.builtin.dnf: + ansible.builtin.package: name: findutils state: present - when: ansible_pkg_mgr == 'dnf' + when: ansible_pkg_mgr in ('dnf', 'dnf5') diff --git a/molecule/java-min-offline/converge.yml b/molecule/java-min-offline/converge.yml index 7ab6e38..5e49082 100644 --- a/molecule/java-min-offline/converge.yml +++ b/molecule/java-min-offline/converge.yml @@ -10,6 +10,13 @@ changed_when: false when: ansible_pkg_mgr == 'apt' + # Workaround for Fedora 41 https://github.com/ansible/ansible/issues/84206 + - name: Install python3-libdnf5 + become: true + ansible.builtin.command: dnf install -y python3-libdnf5 + when: ansible_facts.pkg_mgr == 'dnf5' + changed_when: false + - name: Create local archive directory ansible.builtin.file: state: directory @@ -47,7 +54,7 @@ - ansible_local.java.general.home is defined - name: Install find - required for tests (dnf) - ansible.builtin.dnf: + ansible.builtin.package: name: findutils state: present - when: ansible_pkg_mgr == 'dnf' + when: ansible_pkg_mgr in ('dnf', 'dnf5') diff --git a/molecule/java-min-online/converge.yml b/molecule/java-min-online/converge.yml index 5c9565a..aa12689 100644 --- a/molecule/java-min-online/converge.yml +++ b/molecule/java-min-online/converge.yml @@ -10,6 +10,13 @@ changed_when: false when: ansible_pkg_mgr == 'apt' + # Workaround for Fedora 41 https://github.com/ansible/ansible/issues/84206 + - name: Install python3-libdnf5 + become: true + ansible.builtin.command: dnf install -y python3-libdnf5 + when: ansible_facts.pkg_mgr == 'dnf5' + changed_when: false + roles: - role: ansible-role-java java_version: 8.0.402+6 @@ -23,7 +30,7 @@ - ansible_local.java.general.home is defined - name: Install find - required for tests (dnf) - ansible.builtin.dnf: + ansible.builtin.package: name: findutils state: present - when: ansible_pkg_mgr == 'dnf' + when: ansible_pkg_mgr in ('dnf', 'dnf5') diff --git a/molecule/java-old-lts-offline/converge.yml b/molecule/java-old-lts-offline/converge.yml index a4b470f..64345e5 100644 --- a/molecule/java-old-lts-offline/converge.yml +++ b/molecule/java-old-lts-offline/converge.yml @@ -10,6 +10,13 @@ changed_when: false when: ansible_pkg_mgr == 'apt' + # Workaround for Fedora 41 https://github.com/ansible/ansible/issues/84206 + - name: Install python3-libdnf5 + become: true + ansible.builtin.command: dnf install -y python3-libdnf5 + when: ansible_facts.pkg_mgr == 'dnf5' + changed_when: false + - name: Create local archive directory ansible.builtin.file: state: directory @@ -43,7 +50,7 @@ - ansible_local.java.general.home is defined - name: Install find - required for tests (dnf) - ansible.builtin.dnf: + ansible.builtin.package: name: findutils state: present - when: ansible_pkg_mgr == 'dnf' + when: ansible_pkg_mgr in ('dnf', 'dnf5') diff --git a/molecule/java-old-lts-online/converge.yml b/molecule/java-old-lts-online/converge.yml index 0c93765..4fe44dc 100644 --- a/molecule/java-old-lts-online/converge.yml +++ b/molecule/java-old-lts-online/converge.yml @@ -10,6 +10,13 @@ changed_when: false when: ansible_pkg_mgr == 'apt' + # Workaround for Fedora 41 https://github.com/ansible/ansible/issues/84206 + - name: Install python3-libdnf5 + become: true + ansible.builtin.command: dnf install -y python3-libdnf5 + when: ansible_facts.pkg_mgr == 'dnf5' + changed_when: false + roles: - role: ansible-role-java java_version: '11' @@ -23,7 +30,7 @@ - ansible_local.java.general.home is defined - name: Install find - required for tests (dnf) - ansible.builtin.dnf: + ansible.builtin.package: name: findutils state: present - when: ansible_pkg_mgr == 'dnf' + when: ansible_pkg_mgr in ('dnf', 'dnf5') diff --git a/tasks/adoptium.yml b/tasks/adoptium.yml index fb0d31a..95ce6a8 100644 --- a/tasks/adoptium.yml +++ b/tasks/adoptium.yml @@ -88,7 +88,7 @@ ansible.builtin.package: name: '{{ java_dependencies }}' state: present - when: ansible_pkg_mgr in ('apt', 'yum', 'dnf', 'zypper') + when: ansible_pkg_mgr in ('apt', 'yum', 'dnf', 'dnf5', 'zypper') # Workaround for: https://github.com/AdoptOpenJDK/openjdk-build/issues/660 - name: Check JDK archive layout diff --git a/vars/packages/dnf5.yml b/vars/packages/dnf5.yml new file mode 100644 index 0000000..36124cc --- /dev/null +++ b/vars/packages/dnf5.yml @@ -0,0 +1,10 @@ +# code: language=ansible +--- +# Dependencies required to install/use Java +java_dependencies: + - tar + - gzip + - unzip + - freetype + - fontconfig + - dejavu-sans-fonts