From 5bce86bfe86e4b22740f92568312498fde9104b3 Mon Sep 17 00:00:00 2001 From: Colin Stubbs Date: Fri, 8 Apr 2016 20:50:23 +1000 Subject: Fix for issue ytti/382, filters out additional credentials/secrets which change regularly in some way. Tested with BIG-IP v11.6.1 --- lib/oxidized/model/tmos.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lib/oxidized') diff --git a/lib/oxidized/model/tmos.rb b/lib/oxidized/model/tmos.rb index 3570015..390046d 100644 --- a/lib/oxidized/model/tmos.rb +++ b/lib/oxidized/model/tmos.rb @@ -3,10 +3,12 @@ class TMOS < Oxidized::Model comment '# ' cmd :secret do |cfg| - cfg.gsub!(/password (\S+)/, 'password ') - cfg.gsub!(/passphrase (\S+)/, 'passphrase ') - cfg.gsub!(/community (\S+)/, 'community ') - cfg.gsub!(/community-name (\S+)/, 'community-name ') + cfg.gsub!(/^([\s\t]*)secret \S+/, '\1secret ') + cfg.gsub!(/^([\s\t]*\S*)password \S+/, '\1password ') + cfg.gsub!(/^([\s\t]*\S*)passphrase \S+/, '\1passphrase ') + cfg.gsub!(/community \S+/, 'community ') + cfg.gsub!(/community-name \S+/, 'community-name ') + cfg.gsub!(/^([\s\t]*\S*)encrypted \S+$/, '\1encrypted ') cfg end -- cgit v1.2.1