-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from xortim/zulu-changes
use rpm and yum_repo modules
- Loading branch information
Showing
1 changed file
with
25 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |