mirror of
https://github.com/ansible-middleware/keycloak.git
synced 2026-07-25 00:44:48 +00:00
Fix downstream SSO collection errors
This commit is contained in:
@@ -388,6 +388,6 @@ argument_specs:
|
||||
description: "Red Hat SSO patch archive filename"
|
||||
type: "str"
|
||||
sso_product_category:
|
||||
default: "core.service.rhsso"
|
||||
description: "JBossNetwork API category for Single Sign-On"
|
||||
default: "CORE.SERVICE.RHSSO"
|
||||
description: "Unified Downloads API category for Single Sign-On"
|
||||
type: "str"
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
|
||||
- name: Determine install zipfile from search results
|
||||
ansible.builtin.set_fact:
|
||||
rhn_filtered_products: "{{ rhn_products.results | selectattr('file_name', 'match', '[^/]*/' + sso_archive + '$') }}"
|
||||
rhn_filtered_products: "{{ rhn_products.results | selectattr('file_name', 'match', '.*rh-sso-' + sso_version.split('.')[:2] | join('.') + '.*-server-dist\\.zip$') | rejectattr('file_name', 'search', 'maven|src|license|provenance|adapter') | list }}"
|
||||
delegate_to: localhost
|
||||
run_once: true
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
mode: '0640'
|
||||
notify:
|
||||
- restart keycloak
|
||||
when: keycloak_config_override_template | length > 0
|
||||
when: (keycloak_config_override_template | default('', true)) | length > 0
|
||||
|
||||
- name: "Deploy standalone {{ keycloak.service_name }} config to {{ keycloak_config_path_to_standalone_xml }}"
|
||||
become: "{{ keycloak_install_require_privilege_escalation | default(true) }}"
|
||||
@@ -240,7 +240,7 @@
|
||||
- restart keycloak
|
||||
when:
|
||||
- not keycloak_ha_enabled
|
||||
- keycloak_config_override_template | length == 0
|
||||
- (keycloak_config_override_template | default('', true)) | length == 0
|
||||
|
||||
- name: Create tcpping cluster node list
|
||||
ansible.builtin.set_fact:
|
||||
@@ -269,7 +269,7 @@
|
||||
when:
|
||||
- keycloak_ha_enabled
|
||||
- not keycloak_remote_cache_enabled
|
||||
- keycloak_config_override_template | length == 0
|
||||
- (keycloak_config_override_template | default('', true)) | length == 0
|
||||
|
||||
- name: "Deploy HA {{ keycloak.service_name }} config with infinispan remote cache store to {{ keycloak_config_path_to_standalone_xml }}"
|
||||
become: "{{ keycloak_install_require_privilege_escalation | default(true) }}"
|
||||
@@ -284,7 +284,7 @@
|
||||
when:
|
||||
- keycloak_ha_enabled
|
||||
- keycloak_remote_cache_enabled
|
||||
- keycloak_config_override_template | length == 0
|
||||
- (keycloak_config_override_template | default('', true)) | length == 0
|
||||
|
||||
- name: "Deploy profile.properties file to {{ keycloak_config_path_to_properties }}"
|
||||
become: "{{ keycloak_install_require_privilege_escalation | default(true) }}"
|
||||
@@ -296,4 +296,4 @@
|
||||
mode: '0640'
|
||||
notify:
|
||||
- restart keycloak
|
||||
when: keycloak_features | length > 0
|
||||
when: (keycloak_features | default([], true)) | length > 0
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
- name: Validate admin console password
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- keycloak_admin_password | length > 12
|
||||
- (keycloak_admin_password | default('', true)) | length > 12
|
||||
quiet: true
|
||||
fail_msg: >
|
||||
The console administrator password is empty or invalid. Please set the keycloak_admin_password variable to a 12+ char long string
|
||||
@@ -31,9 +31,9 @@
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- keycloak_jdbc_engine is defined and keycloak_jdbc_engine in [ 'postgres', 'mariadb', 'sqlserver' ]
|
||||
- keycloak_jdbc_url | length > 0
|
||||
- keycloak_db_user | length > 0
|
||||
- keycloak_db_pass | length > 0
|
||||
- (keycloak_jdbc_url | default('', true)) | length > 0
|
||||
- (keycloak_db_user | default('', true)) | length > 0
|
||||
- (keycloak_db_pass | default('', true)) | length > 0
|
||||
quiet: true
|
||||
fail_msg: "Configuration for the JDBC persistence is invalid or incomplete"
|
||||
success_msg: "Configuring JDBC persistence using {{ keycloak_jdbc_engine }} database"
|
||||
|
||||
@@ -39,14 +39,14 @@
|
||||
filtered_versions: "{{ rhn_products.results | map(attribute='file_name') | \
|
||||
select('match', '^[^/]*/rh-sso-.*[0-9]*[.][0-9]*[.][0-9]*.*$') | \
|
||||
map('regex_replace', '[^/]*/rh-sso-([0-9]*[.][0-9]*[.][0-9]*(-[0-9])?)-.*', '\\1') | list | unique }}"
|
||||
when: sso_patch_version is not defined or sso_patch_version | length == 0
|
||||
when: (sso_patch_version | default('', true)) | length == 0
|
||||
delegate_to: localhost
|
||||
run_once: true
|
||||
|
||||
- name: Determine latest version
|
||||
ansible.builtin.set_fact:
|
||||
sso_latest_version: "{{ filtered_versions | middleware_automation.common.version_sort | last }}"
|
||||
when: sso_patch_version is not defined or sso_patch_version | length == 0
|
||||
when: (sso_patch_version | default('', true)) | length == 0
|
||||
delegate_to: localhost
|
||||
run_once: true
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
rhn_filtered_products: "{{ rhn_products.results | selectattr('file_name', 'match', '[^/]*/rh-sso-' + sso_latest_version + '-patch.zip$') }}"
|
||||
patch_bundle: "rh-sso-{{ sso_latest_version }}-patch.zip"
|
||||
patch_version: "{{ sso_latest_version }}"
|
||||
when: sso_patch_version is not defined or sso_patch_version | length == 0
|
||||
when: (sso_patch_version | default('', true)) | length == 0
|
||||
delegate_to: localhost
|
||||
run_once: true
|
||||
|
||||
|
||||
@@ -526,7 +526,7 @@
|
||||
<properties>
|
||||
<property name="frontendUrl" value="{{ keycloak_modcluster.frontend_url }}"/>
|
||||
<property name="forceBackendUrlToFrontendUrl" value="{{ keycloak_modcluster.force_frontend_url }}"/>
|
||||
{% if keycloak_modcluster.admin_url | length > 0 %}
|
||||
{% if (keycloak_modcluster.admin_url | default('', true)) | length > 0 %}
|
||||
<property name="adminUrl" value="{{ keycloak_modcluster.admin_url }}" />
|
||||
{% endif %}
|
||||
</properties>
|
||||
@@ -541,7 +541,7 @@
|
||||
<subsystem xmlns="urn:wildfly:metrics:1.0" security-enabled="false" exposed-subsystems="*" prefix="${wildfly.metrics.prefix:jboss}"/>
|
||||
{% if keycloak_modcluster.enabled %}
|
||||
<subsystem xmlns="urn:jboss:domain:modcluster:5.0">
|
||||
<proxy name="default" advertise="false" listener="ajp" proxies="{{ ['proxy_'] | product(keycloak_modcluster.reverse_proxy_urls | map(attribute='host')) | map('join') | list | join(' ') }}">
|
||||
<proxy name="default" advertise="false" listener="ajp" proxies="{{ ['proxy_'] | product((keycloak_modcluster.reverse_proxy_urls | default([])) | map(attribute='host')) | map('join') | list | join(' ') }}">
|
||||
<dynamic-load-provider>
|
||||
<load-metric type="cpu"/>
|
||||
</dynamic-load-provider>
|
||||
|
||||
@@ -564,5 +564,5 @@ argument_specs:
|
||||
type: "str"
|
||||
rhbk_product_category:
|
||||
default: "RHBK"
|
||||
description: "JBossNetwork API category for Red Hat Build of Keycloak"
|
||||
description: "Unified Downloads API category for Red Hat Build of Keycloak"
|
||||
type: "str"
|
||||
|
||||
Reference in New Issue
Block a user