role-amazon-corretto/tasks/main.yml

17 lines
418 B
YAML
Raw Permalink Normal View History

2022-12-16 23:44:13 +00:00
---
- name: "Check java version"
ansible.builtin.shell: "java --version |cut -d' ' -f 2 | cut -d'.' -f 1 | head -1"
args:
executable: /bin/bash
register: corretto_active_version_sout
changed_when: false
failed_when: false
when: corretto_version_check|bool
- name: "Set active version"
set_fact:
corretto_active_version: "{{ corretto_active_version_sout.stdout }}"
- include_tasks: install.yml