Zack Williams | f6cc012 | 2018-03-30 16:00:49 -0700 | [diff] [blame] | 1 | --- |
Matteo Scandolo | 3896c47 | 2017-08-01 13:31:42 -0700 | [diff] [blame] | 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 | |
Zack Williams | 275e48b | 2017-03-24 12:16:00 -0700 | [diff] [blame] | 16 | # 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 Williams | f6cc012 | 2018-03-30 16:00:49 -0700 | [diff] [blame] | 34 | until: result is success |
Zack Williams | 275e48b | 2017-03-24 12:16:00 -0700 | [diff] [blame] | 35 | 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 | |