Sha256: 1f19714e170fb160d5931e14b552923d69b8763071d984965672eed1ee6350e2
Contents?: true
Size: 825 Bytes
Versions: 409
Compression:
Stored size: 825 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| if Puppet[:tasks] raise Puppet::ParseErrorWithIssue.from_issue_and_stack( Puppet::Pops::Issues::CATALOG_OPERATION_NOT_SUPPORTED_WHEN_SCRIPTING, {:operation => 'tagged'}) end retval = true vals.each do |val| unless compiler.catalog.tagged?(val) or resource.tagged?(val) retval = false break end end return retval end
Version data entries
409 entries across 409 versions & 2 rubygems