Sha256: 2b372309646fbad2e2d5676d1909e320e4884755e7771b50982e7599773bddf2
Contents?: true
Size: 812 Bytes
Versions: 73
Compression:
Stored size: 812 Bytes
Contents
# frozen_string_literal: true # Returns a ResultSet with canary/skipped-node errors for each Target provided. # # This function takes a single parameter: # * List of nodes (Array[Variant[Target,String]]) # # Returns a ResultSet. Puppet::Functions.create_function(:'canary::skip') do dispatch :skip_result do param 'Array[Variant[Target,String]]', :nodes end def skip_result(nodes) results = nodes.map do |node| node = Bolt::Target.new(node) unless node.is_a? Bolt::Target Bolt::Result.new(node, value: { '_error' => { 'msg' => "Skipped #{node.name} because of a previous failure", 'kind' => 'canary/skipped-node', 'details' => {} } }) end Bolt::ResultSet.new(results) end end
Version data entries
73 entries across 73 versions & 1 rubygems