diff options
author | Mike Bryant <m@ocado.com> | 2016-02-02 11:03:11 +0000 |
---|---|---|
committer | Mike Bryant <m@ocado.com> | 2016-02-02 11:03:11 +0000 |
commit | ba5bfd826ce8d13500497ff477ec219df921f527 (patch) | |
tree | 19807f9b5c33238693678c8bcf8df90ee9939208 | |
parent | a70afa90707df43408caa1dd3989058ef6dfc910 (diff) |
Add OpenGear model
-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 |