blob: 0120a1f96d1c6cb79103036873c0dedb05c0694b [file] [log] [blame]
Zack Williamsf6cc0122018-03-30 16:00:49 -07001---
Matteo Scandolo3896c472017-08-01 13:31:42 -07002# 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
Zack Williams275e48b2017-03-24 12:16:00 -070016# java-oracle/tasks/main
17
18- name: Install add-apt-repository
19 become: yes
20 apt:
21 name: "{{ item }}"
22 update_cache: yes
23 cache_valid_time: 3600
24 with_items:
25 - apt-transport-https
26 - software-properties-common
27 - ca-certificates
28
29- name: Add Oracle Java repository
30 become: yes
31 apt_repository:
32 repo: 'ppa:webupd8team/java'
33 register: result
Zack Williamsf6cc0122018-03-30 16:00:49 -070034 until: result is success
Zack Williams275e48b2017-03-24 12:16:00 -070035 retries: 3
36 delay: 10
37
38- name: Accept Java 8 license
39 become: yes
40 debconf:
41 name: 'oracle-java8-installer'
42 question: 'shared/accepted-oracle-license-v1-1'
43 value: 'true'
44 vtype: 'select'
45
46- name: Install Oracle Java 8
47 become: yes
48 apt:
49 name: "{{ item }}"
50 update_cache: yes
51 cache_valid_time: 3600
52 with_items:
53 - oracle-java8-installer
54 - oracle-java8-set-default
55