diff --git a/roles/keycloak/meta/argument_specs.yml b/roles/keycloak/meta/argument_specs.yml index 29ebce8..0a27aba 100644 --- a/roles/keycloak/meta/argument_specs.yml +++ b/roles/keycloak/meta/argument_specs.yml @@ -273,7 +273,7 @@ argument_specs: description: "Red Hat Single Sign-On version" type: "str" sso_rhn_id: - default: "{{ sso_rhn_ids[sso_version].id }}" + default: "101971" description: "Customer Portal product ID for Red Hat SSO" type: "str" sso_archive: @@ -316,7 +316,15 @@ argument_specs: default: "Red Hat Single Sign-On" description: "systemd description for Red Hat Single Sign-On" type: "str" + sso_patch_version: + default: "7.5.3" + description: "Red Hat Single Sign-On latest cumulative patch version" + type: "str" sso_patch_bundle: - default: "rh-sso-{{ sso_rhn_ids[sso_version].latest_cp.v }}-patch.zip" + default: "rh-sso-{{ sso_patch_version }}-patch.zip" description: "Red Hat SSO patch archive filename" type: "str" + sso_patch_rhn_id: + default: "104738" + description: "Customer Portal product ID for Red Hat SSO latest cumulative patch" + type: "str" diff --git a/roles/keycloak/tasks/rhsso_patch.yml b/roles/keycloak/tasks/rhsso_patch.yml index 67739a4..97993a2 100644 --- a/roles/keycloak/tasks/rhsso_patch.yml +++ b/roles/keycloak/tasks/rhsso_patch.yml @@ -11,7 +11,7 @@ - name: Perform download from RHN middleware_automation.redhat_csp_download.redhat_csp_download: - url: "{{ keycloak_rhn_url }}{{ sso_rhn_ids[keycloak_version].latest_cp.id }}" + url: "{{ keycloak_rhn_url }}{{ sso_patch_rhn_id }}" dest: "{{ local_path.stat.path }}/{{ sso_patch_bundle }}" username: "{{ rhn_username }}" password: "{{ rhn_password }}" @@ -48,9 +48,9 @@ when: - cli_result is defined - cli_result.stdout is defined - - sso_rhn_ids[keycloak_version].latest_cp.v not in cli_result.stdout + - sso_patch_version not in cli_result.stdout block: - - name: "Apply patch {{ sso_rhn_ids[keycloak_version].latest_cp.v }} to server" + - name: "Apply patch {{ sso_patch_version }} to server" ansible.builtin.include_tasks: rhsso_cli.yml vars: query: "patch apply {{ patch_archive }}" @@ -78,10 +78,10 @@ - name: "Verify installed patch version" ansible.builtin.assert: that: - - sso_rhn_ids[keycloak_version].latest_cp.v not in cli_result.stdout + - sso_patch_version not in cli_result.stdout fail_msg: "Patch installation failed" success_msg: "Patch installation successful" - name: "Skipping patch" ansible.builtin.debug: - msg: "Latest cumulative patch {{ sso_rhn_ids[keycloak_version].latest_cp.v }} already installed, skipping patch installation." + msg: "Latest cumulative patch {{ sso_patch_version }} already installed, skipping patch installation." diff --git a/roles/keycloak/vars/main.yml b/roles/keycloak/vars/main.yml index 77f35ff..a634e6d 100644 --- a/roles/keycloak/vars/main.yml +++ b/roles/keycloak/vars/main.yml @@ -1,11 +1,5 @@ --- # internal variables below -sso_rhn_ids: - '7.5.0': # noqa vars_in_vars_files_have_valid_names - id: '101971' - latest_cp: - id: '103836' - v: '7.5.1' # locations keycloak_url: "http://{{ keycloak_host }}:{{ keycloak_http_port }}"