Sha256: e904e0a48e886888dfa6440d13daef9a8a452208fcede26dd7ce3a4b5596f99b

Contents?: true

Size: 737 Bytes

Versions: 10

Compression:

Stored size: 737 Bytes

Contents

# Test whether a given tag is set.  This functions as a big OR -- if any of the specified tags are unset, we return false.
Puppet::Parser::Functions::newfunction(:tagged, :type => :rvalue, :doc => "A boolean function that
    tells you whether the current container is tagged with the specified tags.
    The tags are ANDed, so that all of the specified tags must be included for
    the function to return true.") do |vals|
        configtags = compiler.catalog.tags
        resourcetags = resource.tags

        retval = true
        vals.each do |val|
            unless configtags.include?(val) or resourcetags.include?(val)
                retval = false
                break
            end
        end

        return retval
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
puppet-0.25.5 lib/puppet/parser/functions/tagged.rb
puppet-0.25.4 lib/puppet/parser/functions/tagged.rb
puppet-0.25.3 lib/puppet/parser/functions/tagged.rb
puppet-0.24.9 lib/puppet/parser/functions/tagged.rb
puppet-0.25.2 lib/puppet/parser/functions/tagged.rb
puppet-0.25.1 lib/puppet/parser/functions/tagged.rb
puppet-0.25.0 lib/puppet/parser/functions/tagged.rb
puppet-0.24.6 lib/puppet/parser/functions/tagged.rb
puppet-0.24.7 lib/puppet/parser/functions/tagged.rb
puppet-0.24.8 lib/puppet/parser/functions/tagged.rb