diff options
Diffstat (limited to 'lib/oxidized/node.rb')
-rw-r--r-- | lib/oxidized/node.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/oxidized/node.rb b/lib/oxidized/node.rb index 3e46b17..f2b125a 100644 --- a/lib/oxidized/node.rb +++ b/lib/oxidized/node.rb @@ -22,7 +22,7 @@ module Oxidized @vars = opt[:vars] @stats = Stats.new @retry = 0 - @repo = resolve_repo + @repo = resolve_repo opt # model instance needs to access node instance @model.node = self @@ -171,7 +171,9 @@ module Oxidized Oxidized.mgr.model[model].new end - def resolve_repo + def resolve_repo opt + return unless is_git? opt + remote_repo = Oxidized.config.output.git.repo if remote_repo.is_a?(::String) @@ -185,5 +187,9 @@ module Oxidized end end + def is_git? opt + (opt[:output] || Oxidized.config.output.default) == 'git' + end + end end |