Sha256: 8cbb50954a37350b20f11bee6862bc658516a447b77bbff6b8407da635255a7f

Contents?: true

Size: 693 Bytes

Versions: 304

Compression:

Stored size: 693 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, :arity => -2, :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

304 entries across 304 versions & 3 rubygems

Version Path
puppet-5.0.0-universal-darwin lib/puppet/parser/functions/tagged.rb
puppet-4.10.4 lib/puppet/parser/functions/tagged.rb
puppet-4.10.4-x86-mingw32 lib/puppet/parser/functions/tagged.rb
puppet-4.10.4-x64-mingw32 lib/puppet/parser/functions/tagged.rb
puppet-4.10.4-universal-darwin lib/puppet/parser/functions/tagged.rb
puppet-retrospec-1.4.1 vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/tagged.rb
puppet-4.10.1 lib/puppet/parser/functions/tagged.rb
puppet-4.10.1-x86-mingw32 lib/puppet/parser/functions/tagged.rb
puppet-4.10.1-x64-mingw32 lib/puppet/parser/functions/tagged.rb
puppet-4.10.1-universal-darwin lib/puppet/parser/functions/tagged.rb
puppet-retrospec-1.4.0 vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/tagged.rb
puppet-4.10.0 lib/puppet/parser/functions/tagged.rb
puppet-4.10.0-x86-mingw32 lib/puppet/parser/functions/tagged.rb
puppet-4.10.0-x64-mingw32 lib/puppet/parser/functions/tagged.rb
puppet-4.10.0-universal-darwin lib/puppet/parser/functions/tagged.rb
puppet-retrospec-1.3.2 vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/tagged.rb
puppet-4.9.4 lib/puppet/parser/functions/tagged.rb
puppet-4.9.4-x86-mingw32 lib/puppet/parser/functions/tagged.rb
puppet-4.9.4-x64-mingw32 lib/puppet/parser/functions/tagged.rb
puppet-4.9.4-universal-darwin lib/puppet/parser/functions/tagged.rb