check new version
This commit is contained in:
24
roles/02-installation-java/tasks/03-install-java.yml
Normal file
24
roles/02-installation-java/tasks/03-install-java.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
- name: Add Java repository for Ubuntu
|
||||
ansible.builtin.apt_repository:
|
||||
repo: "{{ java_apt_repository.ubuntu }}"
|
||||
state: present
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
|
||||
- name: Add backports repository for Debian
|
||||
ansible.builtin.apt_repository:
|
||||
repo: "{{ java_apt_repository.debian }}"
|
||||
state: present
|
||||
when: ansible_distribution == "Debian"
|
||||
|
||||
- name: Update apt cache
|
||||
ansible.builtin.apt:
|
||||
update_cache: yes
|
||||
cache_valid_time: 3600
|
||||
when: ansible_os_family == "Debian"
|
||||
|
||||
- name: Install Java packages
|
||||
ansible.builtin.apt:
|
||||
name: "{{ java_packages[ansible_distribution | lower] }}"
|
||||
state: present
|
||||
when: ansible_os_family == "Debian"
|
Reference in New Issue
Block a user