Minor fixups to entropy_mask provider

This commit is contained in:
2016-10-10 21:43:30 +01:00
parent 0da0175b3f
commit 11aa4bcb50
2 changed files with 2 additions and 4 deletions

View File

@@ -12,14 +12,14 @@ Puppet::Type.newtype(:entropy_mask) do
end
newproperty(:package) do
desc "Name of hte package being masked"
desc "Name of the package being masked"
end
newproperty(:version) do
desc "Version of the package"
validate do |value|
raise(ArgumentError, "") if value !~ /^([<>]=?|=)?(\d*(?:\.\d+[a-zA-Z]*)*)(?:_((?:alpha|beta|pre|rc)\d*))?/
raise(ArgumentError, "") if value !~ /^(\d*(?:\.\d+[a-zA-Z]*)*)(?:_((?:alpha|beta|pre|rc)\d*))?(-r\d+)?$/
end
end