Skip to content

Commit

Permalink
Merge pull request #1 from xortim/zulu-changes
Browse files Browse the repository at this point in the history
use rpm and yum_repo modules
  • Loading branch information
jblose authored Jul 27, 2019
2 parents 08c40c2 + ccf244d commit c6d0cea
Showing 1 changed file with 25 additions and 15 deletions.
40 changes: 25 additions & 15 deletions playbooks/example_zulu_jdk.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
---
- name: Install Azul Zulu JDK
hosts: example_vms
vars:
- java_ver: 8
tasks:
- name: Add Azul RPM Key for Repo
rpm_key:
state: present
key: http://repos.azulsystems.com/RPM-GPG-KEY-azulsystems
become: yes
- name: Add Azul Package to Yum repos
get_url:
url: http://repos.azulsystems.com/rhel/zulu.repo
dest: /etc/yum.repos.d/zulu.repo
become: yes
- name: Install latest Zulu JDK
yum:
name: zulu-8
state: latest
become: yes
- name: Import Azul GPG key into RPM keyring
become: yes
rpm_key:
key: http://repos.azulsystems.com/RPM-GPG-KEY-azulsystems
state: present

- name: Add Azul JDK repo
become: yes
yum_repository:
name: zulu
description: zulu-$releasever - Azul Systems Inc., Zulu packages for $basearch
file: zulu
baseurl: http://repos.azulsystems.com/rhel/$releasever/$basearch
gpgkey: http://repos.azulsystems.com/RPM-GPG-KEY-azulsystems
gpgcheck: yes
protect: yes
enabled: yes

- name: Install Java
become: yes
yum:
name: "zulu-{{ java_ver }}"
state: present

0 comments on commit c6d0cea

Please sign in to comment.