Sha256: 199d67cdeef92e715f4e59aefacb2232fd3bf5794eed75fbeba91c56eaf3f3e1

Contents?: true

Size: 679 Bytes

Versions: 74

Compression:

Stored size: 679 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

74 entries across 74 versions & 4 rubygems

Version Path
puppet-parse-0.1.4 lib/vendor/puppet/parser/functions/tagged.rb
puppet-parse-0.1.3 lib/vendor/puppet/parser/functions/tagged.rb
puppet-parse-0.1.2 lib/vendor/puppet/parser/functions/tagged.rb
puppet-parse-0.1.1 lib/vendor/puppet/parser/functions/tagged.rb
puppet-2.7.26 lib/puppet/parser/functions/tagged.rb
puppet-2.7.25 lib/puppet/parser/functions/tagged.rb
puppet-2.7.24 lib/puppet/parser/functions/tagged.rb
puppet-2.7.23 lib/puppet/parser/functions/tagged.rb
puppet-2.7.22 lib/puppet/parser/functions/tagged.rb
puppet-parse-0.1.0 lib/vendor/puppet/parser/functions/tagged.rb
puppet-parse-0.0.6 lib/vendor/puppet/parser/functions/tagged.rb
puppet-2.7.21 lib/puppet/parser/functions/tagged.rb
puppet-2.6.18 lib/puppet/parser/functions/tagged.rb
puppet-parse-0.0.5 lib/vendor/puppet/parser/functions/tagged.rb
puppet-parse-0.0.4 lib/vendor/puppet/parser/functions/tagged.rb
puppet-3.0.2 lib/puppet/parser/functions/tagged.rb
puppet-3.0.2.rc3 lib/puppet/parser/functions/tagged.rb
puppet-3.0.2.rc2 lib/puppet/parser/functions/tagged.rb
puppet-3.0.2.rc1 lib/puppet/parser/functions/tagged.rb
puppet-parse-0.0.2 lib/vendor/puppet/parser/functions/tagged.rb