From 31c5f5f5f70b1797967bc2050783ceff5b9d973c Mon Sep 17 00:00:00 2001
From: Jonathan Pastor <jonathancmoa@gmail.com>
Date: Mon, 2 Dec 2019 15:01:45 +0100
Subject: [PATCH] fix ssh host when providing no OAR URL

---
 lib/refrepo/gen/oar-properties.rb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/refrepo/gen/oar-properties.rb b/lib/refrepo/gen/oar-properties.rb
index 0fee151e1d..685a1bca81 100644
--- a/lib/refrepo/gen/oar-properties.rb
+++ b/lib/refrepo/gen/oar-properties.rb
@@ -1421,6 +1421,9 @@ def generate_oar_properties(options)
 
   site_name = options[:site]
 
+  # Replace the site placeholder of ssh hosts by the site
+  options[:ssh][:host] = options[:ssh][:host].gsub('%s', site_name)
+
   # If no cluster is given, then the clusters are the cluster of the given site
   if not options.key? :clusters or options[:clusters].length == 0
     if data_hierarchy['sites'].key? site_name
-- 
GitLab