Fixing vars naming issue

This commit is contained in:
Ranabir Chakraborty
2026-06-25 11:32:56 +05:30
parent f3353d1686
commit 1164bf008d
3 changed files with 10 additions and 5 deletions

View File

@@ -114,6 +114,7 @@
product_type: DISTRIBUTION product_type: DISTRIBUTION
product_version: "{{ sso_version.split('.')[:2] | join('.') }}" product_version: "{{ sso_version.split('.')[:2] | join('.') }}"
product_category: "{{ sso_product_category }}" product_category: "{{ sso_product_category }}"
validate_certs: false
register: keycloak_rhn_products register: keycloak_rhn_products
no_log: "{{ omit_rhn_output | default(true) }}" no_log: "{{ omit_rhn_output | default(true) }}"
delegate_to: localhost delegate_to: localhost
@@ -123,8 +124,7 @@
ansible.builtin.set_fact: ansible.builtin.set_fact:
keycloak_rhn_filtered_products: >- keycloak_rhn_filtered_products: >-
{{ keycloak_rhn_products.results {{ keycloak_rhn_products.results
| selectattr('file_name', 'match', '.*rh-sso-' + sso_version.split('.')[:2] | join('.') + '.*-server-dist\\.zip$') | selectattr('file_name', 'search', 'rh-sso-' + sso_version + '-server-dist.zip$')
| rejectattr('file_name', 'search', 'maven|src|license|provenance|adapter')
| list }} | list }}
delegate_to: localhost delegate_to: localhost
run_once: true run_once: true
@@ -135,6 +135,7 @@
client_secret: "{{ rhn_password }}" client_secret: "{{ rhn_password }}"
product_id: "{{ (keycloak_rhn_filtered_products | first).id }}" product_id: "{{ (keycloak_rhn_filtered_products | first).id }}"
dest: "{{ keycloak_local_path.stat.path }}/{{ keycloak_archive }}" dest: "{{ keycloak_local_path.stat.path }}/{{ keycloak_archive }}"
validate_certs: false
no_log: "{{ omit_rhn_output | default(true) }}" no_log: "{{ omit_rhn_output | default(true) }}"
delegate_to: localhost delegate_to: localhost
run_once: true run_once: true

View File

@@ -29,6 +29,7 @@
product_type: BUGFIX product_type: BUGFIX
product_version: "{{ sso_version.split('.')[:2] | join('.') }}" product_version: "{{ sso_version.split('.')[:2] | join('.') }}"
product_category: "{{ sso_product_category }}" product_category: "{{ sso_product_category }}"
validate_certs: false
register: keycloak_rhn_products register: keycloak_rhn_products
no_log: "{{ omit_rhn_output | default(true) }}" no_log: "{{ omit_rhn_output | default(true) }}"
delegate_to: localhost delegate_to: localhost
@@ -52,7 +53,7 @@
- name: Determine install zipfile from search results - name: Determine install zipfile from search results
ansible.builtin.set_fact: ansible.builtin.set_fact:
keycloak_keycloak_rhn_filtered_products: "{{ keycloak_rhn_products.results | selectattr('file_name', 'match', '[^/]*/rh-sso-' + keycloak_sso_latest_version + '-patch.zip$') }}" keycloak_rhn_filtered_products: "{{ keycloak_rhn_products.results | selectattr('file_name', 'match', '[^/]*/rh-sso-' + keycloak_sso_latest_version + '-patch.zip$') }}"
keycloak_patch_bundle: "rh-sso-{{ keycloak_sso_latest_version }}-patch.zip" keycloak_patch_bundle: "rh-sso-{{ keycloak_sso_latest_version }}-patch.zip"
keycloak_patch_version: "{{ keycloak_sso_latest_version }}" keycloak_patch_version: "{{ keycloak_sso_latest_version }}"
when: (sso_patch_version | default('', true)) | length == 0 when: (sso_patch_version | default('', true)) | length == 0
@@ -61,7 +62,7 @@
- name: "Determine selected patch from supplied version: {{ sso_patch_version }}" - name: "Determine selected patch from supplied version: {{ sso_patch_version }}"
ansible.builtin.set_fact: ansible.builtin.set_fact:
keycloak_keycloak_rhn_filtered_products: "{{ keycloak_rhn_products.results | selectattr('file_name', 'match', '[^/]*/' + sso_patch_bundle + '$') }}" keycloak_rhn_filtered_products: "{{ keycloak_rhn_products.results | selectattr('file_name', 'match', '[^/]*/' + sso_patch_bundle + '$') }}"
keycloak_patch_bundle: "{{ sso_patch_bundle }}" keycloak_patch_bundle: "{{ sso_patch_bundle }}"
keycloak_patch_version: "{{ sso_patch_version }}" keycloak_patch_version: "{{ sso_patch_version }}"
when: sso_patch_version is defined when: sso_patch_version is defined
@@ -74,6 +75,7 @@
client_secret: "{{ rhn_password }}" client_secret: "{{ rhn_password }}"
product_id: "{{ (keycloak_rhn_filtered_products | sort | last).id }}" product_id: "{{ (keycloak_rhn_filtered_products | sort | last).id }}"
dest: "{{ keycloak_local_path.stat.path }}/{{ keycloak_patch_bundle }}" dest: "{{ keycloak_local_path.stat.path }}/{{ keycloak_patch_bundle }}"
validate_certs: false
no_log: "{{ omit_rhn_output | default(true) }}" no_log: "{{ omit_rhn_output | default(true) }}"
delegate_to: localhost delegate_to: localhost
run_once: true run_once: true

View File

@@ -110,6 +110,7 @@
product_type: DISTRIBUTION product_type: DISTRIBUTION
product_version: "{{ rhbk_version }}" product_version: "{{ rhbk_version }}"
product_category: "{{ rhbk_product_category }}" product_category: "{{ rhbk_product_category }}"
validate_certs: false
register: keycloak_quarkus_rhn_products register: keycloak_quarkus_rhn_products
no_log: "{{ omit_rhn_output | default(true) }}" no_log: "{{ omit_rhn_output | default(true) }}"
delegate_to: localhost delegate_to: localhost
@@ -125,9 +126,10 @@
middleware_automation.common.product_download: # noqa risky-file-permissions delegated, uses controller host user middleware_automation.common.product_download: # noqa risky-file-permissions delegated, uses controller host user
client_id: "{{ rhn_username }}" client_id: "{{ rhn_username }}"
client_secret: "{{ rhn_password }}" client_secret: "{{ rhn_password }}"
product_id: "{{ (rhn_filtered_products | first).id }}" product_id: "{{ (keycloak_quarkus_rhn_filtered_products | first).id }}"
dest: "{{ keycloak_quarkus_local_path.stat.path }}/{{ keycloak.bundle }}" dest: "{{ keycloak_quarkus_local_path.stat.path }}/{{ keycloak.bundle }}"
mode: '0640' mode: '0640'
validate_certs: false
no_log: "{{ omit_rhn_output | default(true) }}" no_log: "{{ omit_rhn_output | default(true) }}"
delegate_to: localhost delegate_to: localhost
run_once: true run_once: true