diff options
author | ytti <saku@ytti.fi> | 2016-02-02 13:51:23 +0200 |
---|---|---|
committer | ytti <saku@ytti.fi> | 2016-02-02 13:51:23 +0200 |
commit | fd8922e812ba979f9ccb542dcc1ada4e740b9431 (patch) | |
tree | bb4650d13bda02e1fd1c2ba995ab3e59a32c0709 /lib/oxidized/model/opengear.rb | |
parent | 8b15d01422a32eda7505d67b4387a15ed192d251 (diff) | |
parent | ba5bfd826ce8d13500497ff477ec219df921f527 (diff) |
Merge pull request #302 from ocadotechnology/add-opengear
Add OpenGear model
Diffstat (limited to 'lib/oxidized/model/opengear.rb')
-rw-r--r-- | lib/oxidized/model/opengear.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/oxidized/model/opengear.rb b/lib/oxidized/model/opengear.rb new file mode 100644 index 0000000..7f801f8 --- /dev/null +++ b/lib/oxidized/model/opengear.rb @@ -0,0 +1,19 @@ +class OpenGear < Oxidized::Model + + comment '# ' + + cmd :secret do |cfg| + cfg.gsub!(/password (\S+)/, 'password <secret removed>') + cfg.gsub!(/community (\S+)/, 'community <secret removed>') + cfg + end + + cmd('cat /etc/version') { |cfg| comment cfg } + + cmd 'config -g config' + + cfg :ssh do + exec true # don't run shell, run each command in exec channel + end + +end |