Jonathan Hart | 93956f5 | 2017-08-22 13:12:42 -0700 | [diff] [blame^] | 1 | |
| 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. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 17 | --- |
| 18 | - name: Install add-apt-repostory |
| 19 | become: yes |
alshabib | ecabc36 | 2016-05-23 22:18:11 -0700 | [diff] [blame] | 20 | apt: name=software-properties-common state=latest update_cache=yes |
David K. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 21 | |
| 22 | - name: Add Oracle Java Repository |
| 23 | become: yes |
David K. Bainbridge | ca68f06 | 2016-10-27 11:04:33 -0700 | [diff] [blame] | 24 | apt_repository: |
| 25 | repo: "{{ java_apt_repo | default('ppa:webupd8team/java') }}" |
| 26 | update_cache: yes |
Andy Bavier | e882306 | 2017-02-24 16:34:01 -0500 | [diff] [blame] | 27 | register: result |
| 28 | until: result | success |
| 29 | retries: 3 |
| 30 | delay: 10 |
David K. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 31 | |
| 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 |