Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GITHUB-20] Fix keyserver #19

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Argument | Default | Description
----------|---------|------------

sansible_java_apt_key_id | EB9B1D8886F44E2A | Fingerprint of PGP used to verify repo
sansible_java_apt_keyserver | http://eu.pool.sks-keyservers.net | Keyserver to grab PGP key from
sansible_java_apt_keyserver | http://keyserver.ubuntu.com | Keyserver to grab PGP key from
sansible_java_apt_repo | See defaults | The repo to grab packages from
sansible_java_set_as_default | yes | Set the installed version as default
sansible_java_version | 8 | The Java version to be installed
Expand Down
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

sansible_java_apt_key_id: EB9B1D8886F44E2A
sansible_java_apt_keyserver: http://eu.pool.sks-keyservers.net
sansible_java_apt_keyserver: http://keyserver.ubuntu.com
sansible_java_apt_repo: "deb http://ppa.launchpad.net/openjdk-r/ppa/ubuntu {{ ansible_distribution_release | lower }} main"
sansible_java_set_as_default: yes
sansible_java_version: 7
14 changes: 1 addition & 13 deletions tasks/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,10 @@
state: present

- name: Download OpenJDK PGP key (works with Bionic behind a proxy)
become: yes
get_url:
dest: /usr/local/src/java_openjdk.asc
mode: 0644
url: "{{ sansible_java_apt_keyserver }}/pks/lookup?op=get&search=0x{{ sansible_java_apt_key_id }}"
retries: 2
delay: 10
register: sansible_java_pgp_result
until: sansible_java_pgp_result is succeeded

- name: Ensures OpenJDK PGP key is known
become: yes
apt_key:
file: /usr/local/src/java_openjdk.asc
keyserver: "{{ sansible_java_apt_keyserver }}"
id: "{{ sansible_java_apt_key_id }}"
state: present

- name: Add OpenJDK repo
become: yes
Expand Down