diff --git a/oracle-jdk/defaults/main.yml b/oracle-jdk/defaults/main.yml index 8390bff6..6909863b 100644 --- a/oracle-jdk/defaults/main.yml +++ b/oracle-jdk/defaults/main.yml @@ -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 diff --git a/oracle-jdk/tasks/main.yml b/oracle-jdk/tasks/main.yml index c8e0ce7d..873b44b2 100644 --- a/oracle-jdk/tasks/main.yml +++ b/oracle-jdk/tasks/main.yml @@ -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' ]