summaryrefslogtreecommitdiff
path: root/lib/puppet/type
diff options
context:
space:
mode:
authorHunter Haugen <hunter@puppetlabs.com>2014-12-16 11:48:46 -0800
committerHunter Haugen <hunter@puppetlabs.com>2014-12-16 15:05:31 -0800
commitc6c203fca8da81fea96659bfe9618bb31965b837 (patch)
tree18d801ab4b6bc82b28f0bef283e69fd9a450ddbb /lib/puppet/type
parent1493b212f24ef704f63b90fd6592b61c36cb3210 (diff)
downloadpuppet-stdlib-c6c203fca8da81fea96659bfe9618bb31965b837.tar.gz
puppet-stdlib-c6c203fca8da81fea96659bfe9618bb31965b837.tar.bz2
Remove line match validation
The `match` attribute was validated to match `line`, except that in many cases (even the example given in the docs) a user would want to match a line entirely different from the new line. See comments on the original commit https://github.com/puppetlabs/puppetlabs-stdlib/commit/a06c0d8115892a74666676b50d4282df9850a119 and ask https://ask.puppetlabs.com/question/14366/file_line-resource-match-problems/ for further examples of confusion.
Diffstat (limited to 'lib/puppet/type')
-rw-r--r--lib/puppet/type/file_line.rb7
1 files changed, 0 insertions, 7 deletions
diff --git a/lib/puppet/type/file_line.rb b/lib/puppet/type/file_line.rb
index 9dbe43c..df263e6 100644
--- a/lib/puppet/type/file_line.rb
+++ b/lib/puppet/type/file_line.rb
@@ -71,12 +71,5 @@ Puppet::Type.newtype(:file_line) do
unless self[:line] and self[:path]
raise(Puppet::Error, "Both line and path are required attributes")
end
-
- if (self[:match])
- unless Regexp.new(self[:match]).match(self[:line])
- raise(Puppet::Error, "When providing a 'match' parameter, the value must be a regex that matches against the value of your 'line' parameter")
- end
- end
-
end
end