blob: 86fde25d6d89c6811cbec76f72c9a4d376f7ca20 [file] [log] [blame]
Jonathan Hart93956f52017-08-22 13:12: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
David K. Bainbridge317e7d72016-05-11 08:31:44 -070017---
18- name: Install add-apt-repostory
19 become: yes
alshabibecabc362016-05-23 22:18:11 -070020 apt: name=software-properties-common state=latest update_cache=yes
David K. Bainbridge317e7d72016-05-11 08:31:44 -070021
22- name: Add Oracle Java Repository
23 become: yes
David K. Bainbridgeca68f062016-10-27 11:04:33 -070024 apt_repository:
25 repo: "{{ java_apt_repo | default('ppa:webupd8team/java') }}"
26 update_cache: yes
Andy Baviere8823062017-02-24 16:34:01 -050027 register: result
28 until: result | success
29 retries: 3
30 delay: 10
David K. Bainbridge317e7d72016-05-11 08:31:44 -070031
32- name: Accept Java 8 License
33 become: yes
34 debconf: name='oracle-java8-installer' question='shared/accepted-oracle-license-v1-1' value='true' vtype='select'
35
36- name: Install Oracle Java 8
37 become: yes
38 apt: name={{item}} state=latest
39 with_items:
40 - oracle-java8-installer
41 - ca-certificates
42 - oracle-java8-set-default