Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 621 Bytes

LinuxGeneric.md

File metadata and controls

24 lines (17 loc) · 621 Bytes

LinuxGeneric model notes

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