diff options
author | Bryan Kearney <bkearney@redhat.com> | 2010-02-01 12:24:01 -0500 |
---|---|---|
committer | Bryan Kearney <bkearney@redhat.com> | 2010-02-01 12:24:01 -0500 |
commit | 2ae7516d77c57c2c26c7afca1e8b825f307887c1 (patch) | |
tree | 91d8738a428801d8e30768fd9de021f3082ea684 /lib | |
parent | 55f6239d8efeb08e5a3d99c70257f9979432c16d (diff) | |
download | puppet-2ae7516d77c57c2c26c7afca1e8b825f307887c1.tar.gz puppet-2ae7516d77c57c2c26c7afca1e8b825f307887c1.tar.xz puppet-2ae7516d77c57c2c26c7afca1e8b825f307887c1.zip |
2047: Add a not_include into match
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/provider/augeas/augeas.rb | 4 | ||||
-rw-r--r-- | lib/puppet/type/augeas.rb | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/puppet/provider/augeas/augeas.rb b/lib/puppet/provider/augeas/augeas.rb index 8dccb4e9d..ac11bbf28 100644 --- a/lib/puppet/provider/augeas/augeas.rb +++ b/lib/puppet/provider/augeas/augeas.rb @@ -39,6 +39,7 @@ Puppet::Type.type(:augeas).provide(:augeas) do "match" => [ :path, :glob ], "size" => [:comparator, :int], "include" => [:string], + "not_include" => [:string], "==" => [:glob], "!=" => [:glob] } @@ -206,6 +207,9 @@ Puppet::Type.type(:augeas).provide(:augeas) do when "include" arg = clause_array.shift return_value = result.include?(arg) + when "not_include" + arg = clause_array.shift + return_value = !result.include?(arg) when "==" begin arg = clause_array.shift diff --git a/lib/puppet/type/augeas.rb b/lib/puppet/type/augeas.rb index 4ae3f06e1..cfd1da55b 100644 --- a/lib/puppet/type/augeas.rb +++ b/lib/puppet/type/augeas.rb @@ -71,6 +71,7 @@ Puppet::Type.newtype(:augeas) do get [AUGEAS_PATH] [COMPARATOR] [STRING] match [MATCH_PATH] size [COMPARATOR] [INT] match [MATCH_PATH] include [STRING] + match [MATCH_PATH] not_include [STRING] match [MATCH_PATH] == [AN_ARRAY] match [MATCH_PATH] != [AN_ARRAY] |