- name: Install OpenJDK 18 apt: name: openjdk-18-jdk state: latest - name: Install OpenJDK 19 apt: name: openjdk-19-jdk state: latest - name: Install OpenJDK 11 apt: name: openjdk-11-jdk state: latest - name: Install default JDK apt: name: default-jdk state: latest - name: Install Oracle Java apt: deb: "https://download.oracle.com/java/19/latest/jdk-19_linux-x64_bin.deb"