To expand the usage of this model for more specific needs you can create a file in ~/.config/oxidized/model/linuxgeneric.rb
require 'oxidized/model/linuxgeneric.rb'
class LinuxGeneric
cmd :secret, clear: true do |cfg|
cfg.gsub! /^(default (\S+).* (expires) ).*/, '\\1 <redacted>'
cfg
end
post do
cfg = add_comment 'THE MONKEY PATCH'
cfg += cmd 'firewall-cmd --list-all --zone=public'
end
end
See Extending-Model
Back to Model-Notes