Skip to content

Commit

Permalink
fix custom fact on OPNsense 23.7
Browse files Browse the repository at this point in the history
The support for SSL flavours was already discontinued in OPNsense 23.1,
but the option was removed from the CLI tool later in OPNsense 23.7.
  • Loading branch information
fraenki committed Sep 11, 2023
1 parent fbd93cd commit 3b9822d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/facter/opnsense.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@
end

facts = {}
opn_ver = Facter::Core::Execution.exec("#{opnsense_version} -NAVvfH")
opn_ver = Facter::Core::Execution.exec("#{opnsense_version} -NAVvH")
if opn_ver
facts['name'] = opn_ver.split(' ')[0]
facts['architecture'] = opn_ver.split(' ')[1]
release = {}
release['major'] = opn_ver.split(' ')[2]
release['full'] = opn_ver.split(' ')[3]
release['minor'] = opn_ver.split(' ')[3].split('.')[2]
release['flavour'] = opn_ver.split(' ')[4]
release['hash'] = opn_ver.split(' ')[5]
release['hash'] = opn_ver.split(' ')[4]
facts['release'] = release if release
end

Expand Down

0 comments on commit 3b9822d

Please sign in to comment.