Ryan Barry has uploaded a new change for review. Change subject: Puppet plugin: return a more explicit operatingsystem name ......................................................................
Puppet plugin: return a more explicit operatingsystem name Previously, we merely returned 'oVirt'. Now, strip out spaces from the parsed result in order to match the expected return from other Puppet operating systems. Change-Id: I73be03ef369d023bb94a33d81e6cb90e0a0f976b Signed-off-by: Ryan Barry <[email protected]> --- M plugins/ovirt.rb 1 file changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/32/20132/1 diff --git a/plugins/ovirt.rb b/plugins/ovirt.rb index 0b914b3..b01c5c2 100644 --- a/plugins/ovirt.rb +++ b/plugins/ovirt.rb @@ -23,19 +23,20 @@ if FileTest.exists?("/etc/system-release") txt = File.read("/etc/system-release") if txt =~ /^(.*?)\srelease.*/ - $1 + $1.gsub(//, '') end elsif FileTest.exists?("/etc/default/version") txt = File.read("/etc/default/version") - if txt =~ /^PRODUCT='(.*?)\s/ - $1 + if txt =~ /^PRODUCT='(.*?)'/ + $1.gsub(//, '') end end end end Facter.add(:operatingsystemrelease) do - confine :operatingsystem => %w{oVirt} + confine :operatingsystem => %w{oVirt oVirtNodeHypervisor + RedHatEnterpriseVirtualizationHypervisor} setcode do if FileText.exists?("/etc/system-release") txt = File.text("/etc/system-release") -- To view, visit http://gerrit.ovirt.org/20132 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I73be03ef369d023bb94a33d81e6cb90e0a0f976b Gerrit-PatchSet: 1 Gerrit-Project: ovirt-node Gerrit-Branch: master Gerrit-Owner: Ryan Barry <[email protected]> _______________________________________________ node-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/node-patches
