blob: 4c0d4b9e3bbe6f1bc0eeb78d81d787b41f4133e9 [file] [log] [blame]
Matteo Scandolo3896c472017-08-01 13:31:42 -07001
2# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16
Zack Williams275e48b2017-03-24 12:16:00 -070017---
18# java-oracle/tasks/main
19
20- name: Install add-apt-repository
21 become: yes
22 apt:
23 name: "{{ item }}"
24 update_cache: yes
25 cache_valid_time: 3600
26 with_items:
27 - apt-transport-https
28 - software-properties-common
29 - ca-certificates
30
31- name: Add Oracle Java repository
32 become: yes
33 apt_repository:
34 repo: 'ppa:webupd8team/java'
35 register: result
36 until: result | success
37 retries: 3
38 delay: 10
39
40- name: Accept Java 8 license
41 become: yes
42 debconf:
43 name: 'oracle-java8-installer'
44 question: 'shared/accepted-oracle-license-v1-1'
45 value: 'true'
46 vtype: 'select'
47
48- name: Install Oracle Java 8
49 become: yes
50 apt:
51 name: "{{ item }}"
52 update_cache: yes
53 cache_valid_time: 3600
54 with_items:
55 - oracle-java8-installer
56 - oracle-java8-set-default
57