@@ -238,7 +238,6 @@ def get_system_configuration(self, workspace_id: Annotated[str, "Workspace name/
238238 "sources" : [],
239239 }
240240
241- # Read sap-parameters.yaml
242241 sap_params = self .store .read_file (workspace_id , "sap-parameters.yaml" )
243242 if sap_params :
244243 try :
@@ -261,12 +260,10 @@ def get_system_configuration(self, workspace_id: Annotated[str, "Workspace name/
261260 except Exception :
262261 result ["sources" ].append ({"file" : "sap-parameters.yaml" , "error" : "parse_error" })
263262
264- # Read hosts.yaml
265263 hosts_raw = self .store .read_file (workspace_id , "hosts.yaml" )
266264 if hosts_raw :
267265 try :
268266 hosts_parsed = yaml .safe_load (hosts_raw )
269- # Expecting host groups or list
270267 result ["hosts" ] = hosts_parsed if hosts_parsed else []
271268 result ["sources" ].append (
272269 {
@@ -373,7 +370,7 @@ def resolve_ssh_key(self, workspace_id: Annotated[str, "Workspace name/ID"]) ->
373370 for filename in files :
374371 filename_lower = filename .lower ()
375372 if any (pattern in filename_lower for pattern in key_patterns ):
376- if not filename .endswith (".pub" ): # Skip public keys
373+ if not filename .endswith (".pub" ):
377374 key_path = workspace_path / filename
378375 if key_path .exists ():
379376 logger .info (f"Resolved SSH key: { key_path } " )
@@ -482,27 +479,19 @@ def get_execution_context(self, workspace_id: Annotated[str, "Workspace name/ID"
482479 if not result ["ssh_key_path" ] and self .keyvault_plugin :
483480 secret_id = result ["sap_parameters" ].get ("secret_id" , "" )
484481 if secret_id :
485- logger .info (
486- f"No local SSH key found, attempting to fetch from Key Vault "
487- f"using secret_id: { secret_id } "
488- )
489482 try :
490483 parse_result = json .loads (
491484 self .keyvault_plugin .parse_key_vault_id_and_secret_id (secret_id )
492485 )
493486 if "error" not in parse_result :
494487 vault_name = parse_result .get ("vault_name" )
495488 secret_name = parse_result .get ("secret_name" )
496- managed_identity_client_id = result ["sap_parameters" ].get (
497- "user_assigned_identity_client_id" , ""
498- )
499489 if vault_name and secret_name :
500490 key_result = json .loads (
501491 self .keyvault_plugin .get_ssh_private_key (
502492 secret_name = secret_name ,
503493 vault_name = vault_name ,
504494 key_filename = f"{ workspace_id } _id_rsa" ,
505- managed_identity_client_id = managed_identity_client_id ,
506495 )
507496 )
508497 if "key_path" in key_result :
0 commit comments