Stephane Wartel 231e5ca7d7 Condition if ovs is not already installed
Fix in the fact and manifest
Closes-Bug: #1540118

Change-Id: I2e1b721aca8b7385f24184a9a51cc620c70e5075
Signed-off-by: Stephane Wartel <stephane.wartel@deveryware.com>
2016-02-01 07:58:12 +00:00

11 lines
261 B
Ruby

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