blob: 5df626c1c6495789b561499d3e71972b26a1e868 [file] [log] [blame]
Zack Williams275e48b2017-03-24 12:16:00 -07001---
2# java-oracle/tasks/main
3
4- name: Install add-apt-repository
5 become: yes
6 apt:
7 name: "{{ item }}"
8 update_cache: yes
9 cache_valid_time: 3600
10 with_items:
11 - apt-transport-https
12 - software-properties-common
13 - ca-certificates
14
15- name: Add Oracle Java repository
16 become: yes
17 apt_repository:
18 repo: 'ppa:webupd8team/java'
19 register: result
20 until: result | success
21 retries: 3
22 delay: 10
23
24- name: Accept Java 8 license
25 become: yes
26 debconf:
27 name: 'oracle-java8-installer'
28 question: 'shared/accepted-oracle-license-v1-1'
29 value: 'true'
30 vtype: 'select'
31
32- name: Install Oracle Java 8
33 become: yes
34 apt:
35 name: "{{ item }}"
36 update_cache: yes
37 cache_valid_time: 3600
38 with_items:
39 - oracle-java8-installer
40 - oracle-java8-set-default
41