community.sap_install
community.sap_install copied to clipboard
feat: sap_general_preconfigure disable_all_other_repos logic is restrictive
Ansible Role
sap_general_preconfigure
OS Family
All
Feature/Enhancement request
Depending on the Infrastructure Platform / customised environment, various additional OS Package Repos are required on a host. For example, there are OS Package Repos that are custom on AWS/AZ/GCP, that should remain enabled.
In current logic, to leverage the feature that will automatically set all OS Package Repos to a specific support level (for RHEL this would be main, eus and e4s) and disable all other SAP-related repos - it will disable every repo.
For example:
# Before Ansible Role
Repo ID: rhel-9-for-x86_64-baseos-rpms
Enabled: 1
Repo ID: rhel-9-for-x86_64-baseos-eus-rpms
Enabled: 1
Repo ID: rhel-9-for-x86_64-baseos-e4s-rpms
Enabled: 1
Repo ID: rhel-9-for-x86_64-highavailability-rpms
Enabled: 1
Repo ID: rhel-9-for-x86_64-highavailability-eus-rpms
Enabled: 1
Repo ID: rhel-9-for-x86_64-highavailability-e4s-rpms
Enabled: 1
Repo ID: my-very-special-rpms
Enabled: 1
Repo ID: https://packages.cloud.google.com/yum/repos/cloud-sdk-el9-x86_64
Enabled: 1
# After Ansible Role
Repo ID: rhel-9-for-x86_64-baseos-rpms
Enabled: 0
Repo ID: rhel-9-for-x86_64-baseos-eus-rpms
Enabled: 0
Repo ID: rhel-9-for-x86_64-baseos-e4s-rpms
Enabled: 1
Repo ID: rhel-9-for-x86_64-highavailability-rpms
Enabled: 0
Repo ID: rhel-9-for-x86_64-highavailability-eus-rpms
Enabled: 0
Repo ID: rhel-9-for-x86_64-highavailability-e4s-rpms
Enabled: 1
Repo ID: my-very-special-rpms
Enabled: 0
Repo ID: https://packages.cloud.google.com/yum/repos/cloud-sdk-el9-x86_64
Enabled: 0
In addition, an end-user should be able to select which level of support. At the moment the logic uses a private variable per CPU Arch e.g. __sap_general_preconfigure_max_repo_type_x86_64: 'e4s-' and __sap_general_preconfigure_max_repo_type_ppc64le: 'e4s-'.
It should be possible for an end-user (if they want) to achieve:
# Before Ansible Role
Repo ID: rhel-9-for-x86_64-baseos-rpms
Enabled: 1
Repo ID: rhel-9-for-x86_64-baseos-eus-rpms
Enabled: 1
Repo ID: rhel-9-for-x86_64-baseos-e4s-rpms
Enabled: 1
Repo ID: rhel-9-for-x86_64-highavailability-rpms
Enabled: 1
Repo ID: rhel-9-for-x86_64-highavailability-eus-rpms
Enabled: 1
Repo ID: rhel-9-for-x86_64-highavailability-e4s-rpms
Enabled: 1
Repo ID: my-very-special-rpms
Enabled: 1
Repo ID: https://packages.cloud.google.com/yum/repos/cloud-sdk-el9-x86_64
Enabled: 1
# Desired outcome after Ansible Role
Repo ID: rhel-9-for-x86_64-baseos-rpms
Enabled: 1
Repo ID: rhel-9-for-x86_64-baseos-eus-rpms
Enabled: 0
Repo ID: rhel-9-for-x86_64-baseos-e4s-rpms
Enabled: 0
Repo ID: rhel-9-for-x86_64-highavailability-rpms
Enabled: 1
Repo ID: rhel-9-for-x86_64-highavailability-eus-rpms
Enabled: 0
Repo ID: rhel-9-for-x86_64-highavailability-e4s-rpms
Enabled: 0
Repo ID: my-very-special-rpms
Enabled: 1
Repo ID: https://packages.cloud.google.com/yum/repos/cloud-sdk-el9-x86_64
Enabled: 1
Community participation
Unfortunately I am not in a position to help with the feature
Optional - Attempted solutions or manual steps
No response
@sean-freeman Would setting the variable sap_general_preconfigure_req_repos as mentioned in defaults/main.yml satisfy your feature request? There is also an example in the role's README.md. By setting sap_general_preconfigure_disable_all_other_repos to false, users can avoid all other repos to be disabled (but if they want to disable some repos, they would have to leave sap_general_preconfigure_disable_all_other_repos to the default of true and add all desired repos to the list sap_general_preconfigure_req_repos.
It would satisfy my requirements to fine-tune, as I can define everything verbosely - but I lose the ability to adapt across environments.
However, I am advanced in Ansible and am not the target end-user of this Feature Request 🙂 The target end-user should be blisfully unaware that AWS/AZ/GCP etc have a custom OS Package Repo enabled and should be able to select "Default, EUS or E4S" as their chosen support level final state.