summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBenedikt Heumüller <bheum@users.noreply.github.com>2017-05-16 14:21:04 +0200
committerBenedikt Heumüller <bheum@users.noreply.github.com>2017-05-16 14:21:04 +0200
commit1da216558e9392d3465dba2e6bb79d0221e43c03 (patch)
treedfb82c50d82d62ce72cb112807fb7b810e91aa64 /lib
parent3369ea3903c9763de4bbc800acee424d2d069f38 (diff)
fortios.rb fortios_autoupdate remove FDS Address
The output of "diagnose autoupdate version" contains the FortiGuard Distribution Server (FDS) address. This IP address changes several times per week and therefore versioning is hardly possible. Added a line to remove the IP address when fortios_autoupdate is set true.
Diffstat (limited to 'lib')
-rw-r--r--lib/oxidized/model/fortios.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/oxidized/model/fortios.rb b/lib/oxidized/model/fortios.rb
index cdaa282..0249933 100644
--- a/lib/oxidized/model/fortios.rb
+++ b/lib/oxidized/model/fortios.rb
@@ -38,6 +38,7 @@ class FortiOS < Oxidized::Model
#do not include if variable "show_autoupdate" is set to false
if defined?(vars(:fortios_autoupdate)).nil? || vars(:fortios_autoupdate)
cfg << cmd('diagnose autoupdate version') do |cfg|
+ cfg.gsub! /(FDS Address\n---------\n).*/, '\\1IP Address removed'
comment cfg.each_line.reject { |line| line.match /Last Update|Result/ }.join
end
end