From 6fb983c3e497dcc8d8b000e9064bb43b10be29c8 Mon Sep 17 00:00:00 2001 From: Nick Hilliard Date: Wed, 6 Jul 2016 00:31:26 +0100 Subject: Added support for ssh_no_exec config file variable --- lib/oxidized/model/junos.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/oxidized/model/junos.rb') diff --git a/lib/oxidized/model/junos.rb b/lib/oxidized/model/junos.rb index bdd9bed..6392709 100644 --- a/lib/oxidized/model/junos.rb +++ b/lib/oxidized/model/junos.rb @@ -8,7 +8,7 @@ class JunOS < Oxidized::Model cmd :all do |cfg| # we don't need screen-scraping in ssh due to exec - cfg = cfg.lines.to_a[1..-2].join if telnet + cfg = cfg.lines.to_a[1..-2].join if telnet || !vars(:ssh_no_exec) cfg.lines.map { |line| line.rstrip }.join("\n") + "\n" end @@ -44,7 +44,7 @@ class JunOS < Oxidized::Model end cfg :ssh do - exec true # don't run shell, run each command in exec channel + exec true unless vars :ssh_no_exec # don't run shell, run each command in exec channel end cfg :telnet, :ssh do -- cgit v1.2.1