Skip to content

Commit

Permalink
keycloak:24.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrothstein committed Apr 8, 2024
1 parent 3ce4b4c commit f32b43b
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 37 deletions.
3 changes: 3 additions & 0 deletions .config/ansible-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
skip_list:
- 'name[template]'
3 changes: 3 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
rules:
line-length: disable
4 changes: 3 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
keycloak_ver: 22.0.1
keycloak_ver: 24.0.2
keycloak_mirror: https://github.com/keycloak/keycloak/releases/download

keycloak_parent_install_dir: /usr/local
Expand Down Expand Up @@ -63,3 +63,5 @@ keycloak_checksums:
'20.0.2': sha1:49ccaddaf8e507b088386e731f2c6a9057a47ea9
# https://github.com/keycloak/keycloak/releases/download/22.0.1/keycloak-22.0.1.tar.gz.sha1
'22.0.1': sha1:eea6076b99a78f88104e3a08618f4422d0ff16e2
# https://github.com/keycloak/keycloak/releases/download/24.0.2/keycloak-24.0.2.tar.gz.sha1
'24.0.2': sha1:8b23e722df38fa7661a8eeb6e032c72c9e0818a9
2 changes: 1 addition & 1 deletion dl-checksum.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ dl_ver() {
printf " '%s': sha1:%s\n" $ver $(curl -sSLf $url)
}

dl_ver ${1:-22.0.1}
dl_ver ${1:-24.0.2}
17 changes: 9 additions & 8 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ galaxy_info:
- sso
- secret
- key
license:
- MIT
min_ansible_version: 2.0
license: MIT
min_ansible_version: '2.0'
namespace: andrewrothstein
platforms:
- name: Alpine
versions:
- all
- name: Archlinux
- name: ArchLinux
versions:
- all
- name: Debian
Expand All @@ -23,13 +23,14 @@ galaxy_info:
- bullseye
- name: EL
versions:
- 8
- 9
- '8'
- '9'
- name: Fedora
versions:
- 37
- 38
- '38'
- '39'
- name: Ubuntu
versions:
- focal
- jammy
role_name: keycloak
4 changes: 2 additions & 2 deletions meta/requirements.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: andrewrothstein.unarchivedeps
version: 2.0.1
version: 3.0.2
- name: andrewrothstein.temurin
version: 1.1.8
version: 2.0.0
8 changes: 4 additions & 4 deletions platform-matrix-v1.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[
{
"OS": "alpine",
"OS_VER": "3.17"
"OS_VER": "3.18"
},
{
"OS": "alpine",
"OS_VER": "3.18"
"OS_VER": "3.19"
},
{
"OS": "alpine",
Expand All @@ -25,11 +25,11 @@
},
{
"OS": "fedora",
"OS_VER": "37"
"OS_VER": "38"
},
{
"OS": "fedora",
"OS_VER": "38"
"OS_VER": "39"
},
{
"OS": "rockylinux",
Expand Down
41 changes: 22 additions & 19 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,61 @@
---
- include_role:
name: andrewrothstein.unarchive-deps
- include_role:
- name: Installing andrewrothstein.unarchivedeps
ansible.builtin.include_role:
name: andrewrothstein.unarchivedeps
- name: Installing andrewrothstein.temurin
ansible.builtin.include_role:
name: andrewrothstein.temurin
vars:
openjdk_app: jre
- name: check for existing install at {{ keycloak_install_dir }}
temurin_app: jre
- name: Check for existing install at {{ keycloak_install_dir }}
become: true
become_user: root
stat:
ansible.builtin.stat:
path: '{{ keycloak_install_dir }}'
changed_when: false
register: keycloak_binary
- when: not keycloak_binary.stat.exists
- name: Downloading and installing keycloak
when: not keycloak_binary.stat.exists
block:
- name: downloading {{ keycloak_tgz_url }}...
- name: Downloading {{ keycloak_tgz_url }}...
become: true
become_user: root
get_url:
ansible.builtin.get_url:
url: '{{ keycloak_tgz_url }}'
dest: '{{ keycloak_tmp_tgz }}'
checksum: '{{ keycloak_checksum }}'
mode: 0644
- name: unarchiving {{ keycloak_tmp_tgz }}
mode: '644'
- name: Unarchiving {{ keycloak_tmp_tgz }}
become: true
become_user: root
unarchive:
ansible.builtin.unarchive:
remote_src: true
src: '{{ keycloak_tmp_tgz }}'
dest: '{{ keycloak_parent_install_dir }}'
creates: '{{ keycloak_install_dir }}'
always:
- name: rm {{ keycloak_tmp_tgz }}
- name: Rm {{ keycloak_tmp_tgz }}
become: true
become_user: root
file:
ansible.builtin.file:
path: '{{ keycloak_tmp_tgz }}'
state: absent

- name: linking {{ keycloak_link_dir }} to {{ keycloak_install_dir }}
- name: Linking {{ keycloak_link_dir }} to {{ keycloak_install_dir }}
become: true
become_user: root
file:
ansible.builtin.file:
src: '{{ keycloak_install_dir }}'
dest: '{{ keycloak_link_dir }}'
state: link

- name: adding keycloak to the default bash login shell's path
- name: Adding keycloak to the default bash login shell's path
become: true
become_user: root
with_items:
- f: keycloak.sh
d: /etc/profile.d
template:
ansible.builtin.template:
src: '{{ item.f }}.j2'
dest: '{{ item.d }}/{{ item.f }}'
mode: '{{ item.m|default("0644") }}'
mode: '{{ item.m | default("644") }}'
13 changes: 11 additions & 2 deletions test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
---
- hosts: all
- name: Testing andrewrothstein.keycloak
hosts: all
roles:
- role: '{{playbook_dir}}'
- role: '{{ playbook_dir }}'
tasks:
- name: Executing 'kc.sh --version'
ansible.builtin.command: sh -lc 'kc.sh --version'
changed_when: false
register: keycloak_test_output
- name: Output of 'kc.sh --version'
ansible.builtin.debug:
msg: '{{ keycloak_test_output.stdout }}'

0 comments on commit f32b43b

Please sign in to comment.