File: ovs.rb

package info (click to toggle)
puppet-module-vswitch 23.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 612 kB
  • sloc: ruby: 2,195; python: 33; makefile: 10; sh: 10
file content (10 lines) | stat: -rw-r--r-- 261 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
Facter.add("ovs_version") do
  confine :kernel => "Linux"

  setcode do
    ovs_ver = Facter::Core::Execution.exec('/usr/bin/ovs-vsctl --version')
    if ovs_ver
      ovs_ver.gsub(/.*ovs-vsctl\s+\(Open\s+vSwitch\)\s+(\d+\.\d+\.\d+).*/, '\1')
    end
  end
end