feat: replace hardcoded hub URLs with generic galaxy_servers list#556
Merged
cidrblock merged 1 commit intoansible:mainfrom Mar 24, 2026
Merged
feat: replace hardcoded hub URLs with generic galaxy_servers list#556cidrblock merged 1 commit intoansible:mainfrom
cidrblock merged 1 commit intoansible:mainfrom
Conversation
Decouple ansible.cfg generation and workflow token plumbing from is_official_ee status by introducing a GalaxyServer dataclass and a galaxy_servers list in EEConfig. This allows Portal (or any consumer) to pass an arbitrary set of Galaxy servers — each with id, url, auth_url, and token_required — instead of relying on hardcoded automation_hub_url / private_hub_url fields. Key changes: - New GalaxyServer dataclass with from_dict(), to_schema(), as_dict() - EEConfig.galaxy_servers replaces automation_hub_url / private_hub_url - _render_ansible_cfg() dynamically generates [galaxy_server.<id>] sections with token comments - ansible.cfg is only generated when galaxy_servers is provided (or raw ansible_cfg content is supplied), even for official EE images - execution-environment.yml.j2 uses dynamic ARG loop from ee_galaxy_token_vars instead of hardcoded ARG directives - ee-build.yml.j2 dynamically generates token checks, env vars, and --build-arg flags based on the galaxy_servers configuration - Removed broken Automation Hub Token validation step from workflow - New docs/ee_scaffolding.md comprehensive guide Made-with: Cursor
43a5a8e to
449daa9
Compare
Collaborator
Author
|
+1 from nillashish |
NilashishC
approved these changes
Mar 24, 2026
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace the hardcoded
automation_hub_url/private_hub_urlfields inEEConfigwith a genericgalaxy_serverslist, decoupling ansible.cfg generation and workflow token plumbing fromis_official_eestatus.GalaxyServerdataclass withid,url,auth_url,token_required— includesfrom_dict(),to_schema(),as_dict()with derivedtoken_env_varEEConfig.galaxy_serversreplacesautomation_hub_url/private_hub_urlansible.cfggeneration from the server list, with token comments for eachtoken_requiredserver--build-argflags are all generated from thegalaxy_serversconfigurationansible.cfgis only generated whengalaxy_serversis explicitly provided (or rawansible_cfgis supplied), even for official EE imagesdocs/ee_scaffolding.mdcomprehensive guide covering all EEConfig optionsExample CLI
Resulting
ansible.cfgResulting
execution-environment.yml(relevant section)Resulting
ee-build.yml(relevant sections)Token check step:
Build step token injection:
Behavioral change
ansible.cfgis no longer auto-generated for official EE images when nogalaxy_serversare provided. Previously, using an official Red Hat EE base image would always produce a defaultansible.cfgwith hardcoded Automation Hub / Galaxy entries. Now, theansible.cfgis only created when:galaxy_serversis explicitly provided, ORansible_cfgcontent is suppliedThis makes the behavior explicit and consistent — Portal will pass the full
galaxy_serverslist via--ee-configJSON. A future--default-galaxy-serversCLI flag can restore the convenience for standalone CLI users.Test plan
GalaxyServerdataclass (from_dict,as_dict,to_schema, validation)galaxy_serversverifiesansible.cfg,execution-environment.yml, andee-build.ymlgalaxy_serversproduces noansible.cfgeven with official EE image--no-overwritetest withgalaxy_serversMade with Cursor