Keycloak installation doesn't work with ubuntu 22
Closed this issue · 1 comments
DopeforHope commented
SUMMARY
Usage with Ubuntu fails because of missing rpm and consequently resulting problems.
ISSUE TYPE
- Bug Report
ANSIBLE VERSION
2.12.10
COLLECTION VERSION
Collection Version
------------------------------ -------
ansible.posix 1.5.2
middleware_automation.common 1.0.2
middleware_automation.keycloak 1.2.1
STEPS TO REPRODUCE
---
- hosts: export_vm
vars:
keycloak_admin_password: "{{ keycloud_default_pass }}"
collections:
- middleware_automation.keycloak
roles:
- middleware_automation.keycloak.keycloak
EXPECTED RESULTS
Installation on Ubuntu
ACTUAL RESULTS
Failed.
PLAY [export_vm] ***************************************************************
TASK [Gathering Facts] *********************************************************
ok: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Validating arguments against arg spec 'main'] ***
ok: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Check prerequisites] ***********
included: /home/dopeforhope/.ansible/collections/ansible_collections/middleware_automation/keycloak/roles/keycloak/tasks/prereqs.yml for export_vm
TASK [middleware_automation.keycloak.keycloak : Validate admin console password] ***
ok: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Validate configuration] ********
ok: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Validate remote cache store configuration] ***
ok: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Validate credentials] **********
ok: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Validate persistence configuration] ***
skipping: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Ensure required packages are installed] ***
included: /home/dopeforhope/.ansible/collections/ansible_collections/middleware_automation/keycloak/roles/keycloak/tasks/fastpackages.yml for export_vm
TASK [middleware_automation.keycloak.keycloak : Check if packages are already installed] ***
fatal: [export_vm]: FAILED! => {"changed": true, "cmd": "rpm -q java-1.8.0-openjdk-headless unzip procps-ng initscripts", "msg": "[Errno 2] No such file or directory: b'rpm'", "rc": 2, "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
TASK [middleware_automation.keycloak.keycloak : Add missing packages to the yum install list] ***
ok: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Install packages: []] **********
skipping: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Include firewall config tasks] ***
skipping: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Include install tasks] *********
included: /home/dopeforhope/.ansible/collections/ansible_collections/middleware_automation/keycloak/roles/keycloak/tasks/install.yml for export_vm
TASK [middleware_automation.keycloak.keycloak : Validate parameters] ***********
ok: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Check for an existing deployment] ***
ok: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Stop the old keycloak service] ***
skipping: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Remove the old keycloak deployment] ***
skipping: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Check for an existing deployment after possible forced removal] ***
ok: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Create keycloak service user/group] ***
ok: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Create keycloak install location] ***
ok: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Set download archive path] *****
ok: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Check download archive path] ***
ok: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Check local download archive path] ***
ok: [export_vm -> localhost]
TASK [middleware_automation.keycloak.keycloak : Download keycloak archive] *****
skipping: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Retrieve product download using JBoss Network API] ***
skipping: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Determine install zipfile from search results] ***
skipping: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Download Red Hat Single Sign-On] ***
skipping: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Download rhsso archive from alternate location] ***
skipping: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Check downloaded archive] ******
ok: [export_vm -> localhost]
TASK [middleware_automation.keycloak.keycloak : Copy archive to target nodes] ***
skipping: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Check target directory: /opt/keycloak/keycloak-18.0.2] ***
ok: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Extract Keycloak archive on target] ***
skipping: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Inform decompression was not executed] ***
ok: [export_vm] => {
"msg": "/opt/keycloak/keycloak-18.0.2 already exists and version unchanged, skipping decompression"
}
TASK [middleware_automation.keycloak.keycloak : Reown installation directory to keycloak] ***
ok: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Install postgres driver] *******
skipping: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Deploy custom keycloak config to /opt/keycloak/keycloak-18.0.2/standalone/configuration/keycloak.xml from] ***
skipping: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Deploy standalone keycloak config to /opt/keycloak/keycloak-18.0.2/standalone/configuration/keycloak.xml] ***
ok: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Create tcpping cluster node list] ***
skipping: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Deploy HA keycloak config to /opt/keycloak/keycloak-18.0.2/standalone/configuration/keycloak.xml from standalone.xml.j2] ***
skipping: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Deploy HA keycloak config with infinispan remote cache store to /opt/keycloak/keycloak-18.0.2/standalone/configuration/keycloak.xml] ***
skipping: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Include systemd tasks] *********
included: /home/dopeforhope/.ansible/collections/ansible_collections/middleware_automation/keycloak/roles/keycloak/tasks/systemd.yml for export_vm
TASK [middleware_automation.keycloak.keycloak : Configure keycloak service script wrapper] ***
ok: [export_vm]
TASK [middleware_automation.keycloak.keycloak : Determine JAVA_HOME for selected JVM RPM] ***
fatal: [export_vm]: FAILED! => {"changed": false, "cmd": "set -o pipefail\nrpm -ql java-1.8.0-openjdk-headless | grep -Po '/usr/lib/jvm/.*(?=/bin/java$)'\n", "delta": "0:00:00.010692", "end": "2023-04-11 16:43:23.942225", "msg": "non-zero return code", "rc": 1, "start": "2023-04-11 16:43:23.931533", "stderr": "/bin/bash: line 1: rpm: command not found", "stderr_lines": ["/bin/bash: line 1: rpm: command not found"], "stdout": "", "stdout_lines": []}
PLAY RECAP *********************************************************************
export_vm : ok=25 changed=0 unreachable=0 failed=1 skipped=17 rescued=1 ignored=0
guidograzioli commented
Hello, thanks for your report. We currently only target rhel and derivates unfortunately, but we are open to accept PR for other distributions of course.