library/roles/oracle-jdk: Add the repo key when installing on debian.

This commit is contained in:
Andrea Dell'Amico 2016-07-01 16:15:45 +02:00
parent a19949c63f
commit bc05a26603
2 changed files with 11 additions and 2 deletions

View File

@ -11,6 +11,10 @@ oracle_jdk_packages:
- 'oracle-java{{ jdk_default }}-set-default'
jdk_install_strong_encryption_policy: True
jdk_ubuntu_ppa: 'ppa:webupd8team/java'
jdk_ppa_repo: 'deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main'
jdk_ppa_key: 7B2C3B0889BF5709A105D03AC2518248EEA14886
# If we want a different oracle jdk set the following variables in the local playbook:
jdk_use_tarfile: False
# jdk_java_home: /usr/lib/jvm/java-7-0-25

View File

@ -1,11 +1,16 @@
---
- name: setup the Oracle JDK repository on ubuntu
apt_repository: repo='ppa:webupd8team/java' state=present update_cache=yes
apt_repository: repo='{{ jdk_ubuntu_ppa }}' state=present
when: is_ubuntu
tags: [ 'oracle_jdk', 'jdk' ]
- name: Install the Oracle JDK repository pgp key on debian
apt_key: keyserver=keyserver.ubuntu.com id={{ jdk_ppa_key }}
when: is_debian
tags: [ 'oracle_jdk', 'jdk' ]
- name: setup the Oracle JDK repository on debian
apt_repository: repo='deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main' state=present update_cache=yes
apt_repository: repo='{{ jdk_ppa_repo }}' state=present
when: is_debian
tags: [ 'oracle_jdk', 'jdk' ]