summaryrefslogtreecommitdiff
path: root/lib/oxidized/node.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oxidized/node.rb')
-rw-r--r--lib/oxidized/node.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/oxidized/node.rb b/lib/oxidized/node.rb
index 7a278a9..35bcad9 100644
--- a/lib/oxidized/node.rb
+++ b/lib/oxidized/node.rb
@@ -24,7 +24,7 @@ module Oxidized
@vars = opt[:vars]
@stats = Stats.new
@retry = 0
- @repo = Oxidized.config.output.git.repo
+ @repo = resolve_repo
# model instance needs to access node instance
@model.node = self
@@ -170,5 +170,15 @@ module Oxidized
Oxidized.mgr.model[model].new
end
+ def resolve_repo
+ remote_repo = Oxidized.config.output.git.repo
+
+ if Oxidized.config.output.git.single_repo? || @group.nil? || remote_repo.is_a?(String)
+ remote_repo
+ else
+ remote_repo[@group]
+ end
+ end
+
end
end