bolt 0.16.0 → 0.16.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bolt might be problematic. Click here for more details.

Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bolt/cli.rb +32 -17
  3. data/lib/bolt/config.rb +12 -31
  4. data/lib/bolt/error.rb +18 -7
  5. data/lib/bolt/executor.rb +3 -3
  6. data/lib/bolt/inventory.rb +101 -0
  7. data/lib/bolt/inventory/group.rb +127 -0
  8. data/lib/bolt/node.rb +10 -9
  9. data/lib/bolt/node/ssh.rb +86 -69
  10. data/lib/bolt/node/winrm.rb +3 -3
  11. data/lib/bolt/outputter/human.rb +1 -1
  12. data/lib/bolt/pal.rb +17 -11
  13. data/lib/bolt/result.rb +9 -4
  14. data/lib/bolt/target.rb +26 -11
  15. data/lib/bolt/util.rb +54 -0
  16. data/lib/bolt/version.rb +1 -1
  17. data/modules/boltlib/lib/puppet/functions/fail_plan.rb +27 -0
  18. data/modules/boltlib/lib/puppet/functions/file_upload.rb +4 -4
  19. data/modules/boltlib/lib/puppet/functions/run_command.rb +3 -3
  20. data/modules/boltlib/lib/puppet/functions/run_plan.rb +18 -4
  21. data/modules/boltlib/lib/puppet/functions/run_script.rb +5 -2
  22. data/modules/boltlib/lib/puppet/functions/run_task.rb +3 -3
  23. data/vendored/puppet/lib/puppet/datatypes/error.rb +5 -3
  24. data/vendored/puppet/lib/puppet/datatypes/impl/error.rb +10 -12
  25. data/vendored/puppet/lib/puppet/defaults.rb +33 -25
  26. data/vendored/puppet/lib/puppet/etc.rb +2 -2
  27. data/vendored/puppet/lib/puppet/external/pson/pure/generator.rb +1 -1
  28. data/vendored/puppet/lib/puppet/external/pson/pure/parser.rb +1 -1
  29. data/vendored/puppet/lib/puppet/face/config.rb +45 -0
  30. data/vendored/puppet/lib/puppet/face/module/generate.rb +5 -0
  31. data/vendored/puppet/lib/puppet/functions/annotate.rb +1 -1
  32. data/vendored/puppet/lib/puppet/functions/any.rb +1 -1
  33. data/vendored/puppet/lib/puppet/generate/type.rb +1 -1
  34. data/vendored/puppet/lib/puppet/gettext/config.rb +2 -2
  35. data/vendored/puppet/lib/puppet/gettext/stubs.rb +1 -1
  36. data/vendored/puppet/lib/puppet/interface/action.rb +11 -0
  37. data/vendored/puppet/lib/puppet/interface/action_builder.rb +8 -0
  38. data/vendored/puppet/lib/puppet/network/authstore.rb +1 -1
  39. data/vendored/puppet/lib/puppet/network/http/connection.rb +1 -1
  40. data/vendored/puppet/lib/puppet/parameter/boolean.rb +1 -1
  41. data/vendored/puppet/lib/puppet/parser/ast/branch.rb +1 -1
  42. data/vendored/puppet/lib/puppet/parser/functions/new.rb +1 -1
  43. data/vendored/puppet/lib/puppet/parser/functions/reverse_each.rb +1 -1
  44. data/vendored/puppet/lib/puppet/pops/evaluator/compare_operator.rb +1 -1
  45. data/vendored/puppet/lib/puppet/pops/evaluator/evaluator_impl.rb +3 -3
  46. data/vendored/puppet/lib/puppet/pops/evaluator/literal_evaluator.rb +1 -1
  47. data/vendored/puppet/lib/puppet/pops/evaluator/runtime3_converter.rb +1 -1
  48. data/vendored/puppet/lib/puppet/pops/evaluator/runtime3_support.rb +1 -1
  49. data/vendored/puppet/lib/puppet/pops/issues.rb +1 -1
  50. data/vendored/puppet/lib/puppet/pops/loader/loader.rb +1 -1
  51. data/vendored/puppet/lib/puppet/pops/loader/loader_paths.rb +1 -1
  52. data/vendored/puppet/lib/puppet/pops/loader/module_loaders.rb +3 -5
  53. data/vendored/puppet/lib/puppet/pops/loader/puppet_resource_type_impl_instantiator.rb +1 -1
  54. data/vendored/puppet/lib/puppet/pops/loader/runtime3_type_loader.rb +1 -1
  55. data/vendored/puppet/lib/puppet/pops/loaders.rb +40 -1
  56. data/vendored/puppet/lib/puppet/pops/lookup/interpolation.rb +1 -1
  57. data/vendored/puppet/lib/puppet/pops/model/tree_dumper.rb +1 -1
  58. data/vendored/puppet/lib/puppet/pops/parser/epp_support.rb +1 -1
  59. data/vendored/puppet/lib/puppet/pops/parser/interpolation_support.rb +1 -1
  60. data/vendored/puppet/lib/puppet/pops/parser/lexer2.rb +1 -1
  61. data/vendored/puppet/lib/puppet/pops/parser/lexer_support.rb +2 -2
  62. data/vendored/puppet/lib/puppet/pops/parser/locatable.rb +1 -1
  63. data/vendored/puppet/lib/puppet/pops/parser/locator.rb +2 -6
  64. data/vendored/puppet/lib/puppet/pops/resource/param.rb +1 -1
  65. data/vendored/puppet/lib/puppet/pops/resource/resource_type_impl.rb +1 -1
  66. data/vendored/puppet/lib/puppet/pops/types/iterable.rb +1 -1
  67. data/vendored/puppet/lib/puppet/pops/types/tree_iterators.rb +5 -1
  68. data/vendored/puppet/lib/puppet/pops/types/type_acceptor.rb +1 -1
  69. data/vendored/puppet/lib/puppet/pops/types/type_calculator.rb +1 -1
  70. data/vendored/puppet/lib/puppet/pops/types/type_with_members.rb +1 -1
  71. data/vendored/puppet/lib/puppet/pops/types/types.rb +1 -1
  72. data/vendored/puppet/lib/puppet/provider/package/yum.rb +1 -1
  73. data/vendored/puppet/lib/puppet/provider/service/redhat.rb +3 -2
  74. data/vendored/puppet/lib/puppet/provider/service/systemd.rb +1 -1
  75. data/vendored/puppet/lib/puppet/provider/ssh_authorized_key/parsed.rb +1 -1
  76. data/vendored/puppet/lib/puppet/resource/type.rb +1 -1
  77. data/vendored/puppet/lib/puppet/settings/base_setting.rb +1 -1
  78. data/vendored/puppet/lib/puppet/settings/ini_file.rb +33 -12
  79. data/vendored/puppet/lib/puppet/ssl/certificate_request.rb +2 -2
  80. data/vendored/puppet/lib/puppet/transaction.rb +37 -14
  81. data/vendored/puppet/lib/puppet/type/cron.rb +1 -1
  82. data/vendored/puppet/lib/puppet/type/file/checksum.rb +6 -0
  83. data/vendored/puppet/lib/puppet/type/mount.rb +0 -9
  84. data/vendored/puppet/lib/puppet/util/character_encoding.rb +2 -2
  85. data/vendored/puppet/lib/puppet/util/network_device/cisco/device.rb +5 -5
  86. data/vendored/puppet/lib/puppet/util/rdoc/generators/puppet_generator.rb +1 -1
  87. data/vendored/puppet/lib/puppet/util/windows/process.rb +1 -1
  88. data/vendored/puppet/lib/puppet/vendor/pathspec/lib/pathspec/gitignorespec.rb +18 -18
  89. data/vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/version.rb +2 -2
  90. data/vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/version_range.rb +5 -5
  91. metadata +20 -2
@@ -43,11 +43,7 @@ class Locator
43
43
  def char_offset(byte_offset)
44
44
  end
45
45
 
46
- # Returns the length measured in number of characters from the given start and end reported offset
47
- def char_length(offset, end_offset)
48
- end
49
-
50
- # Returns the length measured in number of characters from the given start and end byte offseta
46
+ # Returns the length measured in number of characters from the given start and end byte offset
51
47
  def char_length(offset, end_offset)
52
48
  end
53
49
 
@@ -326,7 +322,7 @@ class Locator
326
322
  string.byteslice(0, byte_offset).length
327
323
  end
328
324
 
329
- # Returns the length measured in number of characters from the given start and end byte offseta
325
+ # Returns the length measured in number of characters from the given start and end byte offset
330
326
  def char_length(offset, end_offset)
331
327
  string.byteslice(offset, end_offset - offset).length
332
328
  end
@@ -15,7 +15,7 @@
15
15
  module Puppet::Pops
16
16
  module Resource
17
17
  class Param
18
- # This make this class instantiateable from Puppet
18
+ # This make this class instantiable from Puppet
19
19
  include Puppet::Pops::Types::PuppetObject
20
20
 
21
21
  def self.register_ptype(loader, ir)
@@ -11,7 +11,7 @@ def self.register_ptypes(loader, ir)
11
11
  end
12
12
 
13
13
  class ResourceTypeImpl
14
- # Make instances of this class directly createable from the Puppet Language
14
+ # Make instances of this class directly creatable from the Puppet Language
15
15
  # as object.
16
16
  #
17
17
  include Puppet::Pops::Types::PuppetObject
@@ -33,7 +33,7 @@ module Puppet::Pops::Types
33
33
  iter
34
34
  end
35
35
 
36
- # Produces an `Iterable` for one of the following types with the following characterstics:
36
+ # Produces an `Iterable` for one of the following types with the following characteristics:
37
37
  #
38
38
  # `String` - yields each character in the string
39
39
  # `Array` - yields each element in the array
@@ -67,7 +67,7 @@ class TreeIterator
67
67
  false
68
68
  end
69
69
 
70
- def to_array
70
+ def to_a
71
71
  result = []
72
72
  loop do
73
73
  result << self.next
@@ -75,6 +75,10 @@ class TreeIterator
75
75
  result
76
76
  end
77
77
 
78
+ def to_array
79
+ to_a
80
+ end
81
+
78
82
  def reverse_each(&block)
79
83
  r = Iterator.new(PAnyType::DEFAULT, to_array.reverse_each)
80
84
  block_given? ? r.each(&block) : r
@@ -10,7 +10,7 @@ module Types
10
10
  #
11
11
  module TypeAcceptor
12
12
  # @param type [PAnyType] the type that we accept a visit from
13
- # @param quard [RecursionGuard] the guard against self recursion
13
+ # @param guard [RecursionGuard] the guard against self recursion
14
14
  def visit(type, guard)
15
15
  end
16
16
  end
@@ -108,7 +108,7 @@ class TypeCalculator
108
108
  # Answers, does the given callable accept the arguments given in args (an array or a tuple)
109
109
  # @param callable [PCallableType] - the callable
110
110
  # @param args [PArrayType, PTupleType] args optionally including a lambda callable at the end
111
- # @return [Boolan] true if the callable accepts the arguments
111
+ # @return [Boolean] true if the callable accepts the arguments
112
112
  #
113
113
  # @api public
114
114
  def self.callable?(callable, args)
@@ -1,7 +1,7 @@
1
1
  module Puppet::Pops
2
2
  module Types
3
3
 
4
- # Interface implemented by a type that has IvocableMembers
4
+ # Interface implemented by a type that has InvocableMembers
5
5
  module TypeWithMembers
6
6
  # @return [InvocableMember,nil] An invocable member if it exists, or `nil`
7
7
  def [](member_name)
@@ -346,7 +346,7 @@ class PAnyType < TypedModelObject
346
346
  # Answers the question if instances of this type can represent themselves as a string that
347
347
  # can then be passed to the create method
348
348
  #
349
- # @return [Boolean] wether or not the instance has a canonical string representation
349
+ # @return [Boolean] whether or not the instance has a canonical string representation
350
350
  def roundtrip_with_string?
351
351
  false
352
352
  end
@@ -145,7 +145,7 @@ Puppet::Type.type(:package).provide :yum, :parent => :rpm, :source => :rpm do
145
145
  # Quote the DNF docs:
146
146
  # "Yum does this if its obsoletes config option is enabled but
147
147
  # the behavior is not properly documented and can be harmful."
148
- # So we'll stick with the safter option
148
+ # So we'll stick with the safer option
149
149
  # If a user wants to remove obsoletes, they can use { :install_options => '--obsoletes' }
150
150
  # More detail here: https://bugzilla.redhat.com/show_bug.cgi?id=1096506
151
151
  'update'
@@ -33,8 +33,9 @@ Puppet::Type.type(:service).provide :redhat, :parent => :init, :source => :init
33
33
  end
34
34
 
35
35
  # For Suse OS family, chkconfig returns 0 even if the service is disabled or non-existent
36
- # Therefore, check the output for '<name> on' to see if it is enabled
37
- return :false unless Facter.value(:osfamily) != 'Suse' || output =~ /^#{name}\s+on$/
36
+ # Therefore, check the output for '<name> on' (or '<name> B for boot services)
37
+ # to see if it is enabled
38
+ return :false unless Facter.value(:osfamily) != 'Suse' || output =~ /^#{name}\s+(on|B)$/
38
39
 
39
40
  :true
40
41
  end
@@ -179,7 +179,7 @@ Puppet::Type.type(:service).provide :systemd, :parent => :base do
179
179
  def prepare_error_message(name, action, exception)
180
180
  error_return = "Systemd #{action} for #{name} failed!\n"
181
181
  journalctl_command = "journalctl -n 50 --since '5 minutes ago' -u #{name} --no-pager"
182
- Puppet.debug("Runing journalctl command to get logs for systemd #{action} failure: #{journalctl_command}")
182
+ Puppet.debug("Running journalctl command to get logs for systemd #{action} failure: #{journalctl_command}")
183
183
  journalctl_output = execute(journalctl_command)
184
184
  error_return << "journalctl log for #{name}:\n#{journalctl_output}"
185
185
  end
@@ -58,7 +58,7 @@ Puppet::Type.type(:ssh_authorized_key).provide(
58
58
 
59
59
  Puppet::Util::SUIDManager.asuser(@resource.should(:user)) do
60
60
  unless Puppet::FileSystem.exist?(dir = File.dirname(target))
61
- Puppet.debug "Creating #{dir}"
61
+ Puppet.debug "Creating #{dir} as #{@resource.should(:user)}"
62
62
  Dir.mkdir(dir, dir_perm)
63
63
  end
64
64
 
@@ -43,7 +43,7 @@ class Puppet::Resource::Type
43
43
  # :capability - the type name of the capres produced/consumed
44
44
  # :mappings - a hash of attribute_name => Expression
45
45
  # These two attributes are populated in
46
- # PopsBridge::instantiate_CapabilityMaping
46
+ # PopsBridge::instantiate_CapabilityMapping
47
47
 
48
48
  # Map from argument (aka parameter) names to Puppet Type
49
49
  # @return [Hash<Symbol, Puppet::Pops::Types::PAnyType] map from name to type
@@ -98,7 +98,7 @@ class Puppet::Settings::BaseSetting
98
98
  @iscreated
99
99
  end
100
100
 
101
- # short name for the celement
101
+ # short name for the element
102
102
  def short=(value)
103
103
  raise ArgumentError, _("Short names can only be one character.") if value.to_s.length != 1
104
104
  @short = value.to_s
@@ -12,7 +12,7 @@ class Puppet::Settings::IniFile
12
12
  def self.parse(config_fh)
13
13
  config = new([DefaultSection.new])
14
14
  config_fh.each_line do |line|
15
- case line
15
+ case line.chomp
16
16
  when /^(\s*)\[([[:word:]]+)\](\s*)$/
17
17
  config.append(SectionLine.new($1, $2, $3))
18
18
  when /^(\s*)([[:word:]]+)(\s*=\s*)(.*?)(\s*)$/
@@ -34,6 +34,15 @@ class Puppet::Settings::IniFile
34
34
  @lines << line
35
35
  end
36
36
 
37
+ def delete(section, name)
38
+ delete_offset = @lines.index(setting(section, name))
39
+ next_offset = delete_offset + 1
40
+ if next_offset < @lines.length
41
+ @lines[next_offset].previous = @lines[delete_offset].previous
42
+ end
43
+ @lines.delete_at(delete_offset)
44
+ end
45
+
37
46
  def insert_after(line, new_line)
38
47
  new_line.previous = line
39
48
 
@@ -122,6 +131,14 @@ class Puppet::Settings::IniFile
122
131
  end
123
132
  end
124
133
 
134
+ def delete(section_name, name)
135
+ setting = @config.setting(section_name, name)
136
+ if setting
137
+ @config.delete(section_name, name)
138
+ setting.to_s.chomp
139
+ end
140
+ end
141
+
125
142
  private
126
143
 
127
144
  def add_setting(section_name, name, value)
@@ -154,20 +171,24 @@ class Puppet::Settings::IniFile
154
171
  Line = Struct.new(:text) do
155
172
  include LineNumber
156
173
 
174
+ def to_s
175
+ text
176
+ end
177
+
157
178
  def write(fh)
158
- fh.puts(text)
179
+ fh.puts(to_s)
159
180
  end
160
181
  end
161
182
 
162
183
  SettingLine = Struct.new(:prefix, :name, :infix, :value, :suffix) do
163
184
  include LineNumber
164
185
 
186
+ def to_s
187
+ "#{prefix}#{name}#{infix}#{value}#{suffix}"
188
+ end
189
+
165
190
  def write(fh)
166
- fh.write(prefix)
167
- fh.write(name)
168
- fh.write(infix)
169
- fh.write(value)
170
- fh.puts(suffix)
191
+ fh.puts(to_s)
171
192
  end
172
193
 
173
194
  def ==(other)
@@ -178,12 +199,12 @@ class Puppet::Settings::IniFile
178
199
  SectionLine = Struct.new(:prefix, :name, :suffix) do
179
200
  include LineNumber
180
201
 
202
+ def to_s
203
+ "#{prefix}[#{name}]#{suffix}"
204
+ end
205
+
181
206
  def write(fh)
182
- fh.write(prefix)
183
- fh.write("[")
184
- fh.write(name)
185
- fh.write("]")
186
- fh.puts(suffix)
207
+ fh.puts(to_s)
187
208
  end
188
209
  end
189
210
 
@@ -109,7 +109,7 @@ DOC
109
109
 
110
110
  def ext_value_to_ruby_value(asn1_arr)
111
111
  # A list of ASN1 types than can't be directly converted to a Ruby type
112
- @non_convertable ||= [OpenSSL::ASN1::EndOfContent,
112
+ @non_convertible ||= [OpenSSL::ASN1::EndOfContent,
113
113
  OpenSSL::ASN1::BitString,
114
114
  OpenSSL::ASN1::Null,
115
115
  OpenSSL::ASN1::Enumerated,
@@ -130,7 +130,7 @@ DOC
130
130
  # type, use the original ASN1 value. This is needed to work around a bug
131
131
  # in Ruby's OpenSSL library which doesn't convert the value of unknown
132
132
  # extension OIDs properly. See PUP-3560
133
- if @non_convertable.include?(asn1_val.class) then
133
+ if @non_convertible.include?(asn1_val.class) then
134
134
  # Allows OpenSSL to take the ASN1 value and turn it into something Ruby understands
135
135
  OpenSSL::X509::Extension.new(asn1_arr.first.value, asn1_val.to_der).value
136
136
  else
@@ -28,7 +28,7 @@ class Puppet::Transaction
28
28
  # Handles most of the actual interacting with resources
29
29
  attr_reader :resource_harness
30
30
 
31
- attr_reader :prefetched_providers
31
+ attr_reader :prefetched_providers, :prefetch_failed_providers
32
32
 
33
33
  # @!attribute [r] persistence
34
34
  # @return [Puppet::Transaction::Persistence] persistence object for cross
@@ -54,6 +54,8 @@ class Puppet::Transaction
54
54
  @resource_harness = Puppet::Transaction::ResourceHarness.new(self)
55
55
 
56
56
  @prefetched_providers = Hash.new { |h,k| h[k] = {} }
57
+
58
+ @prefetch_failed_providers = Hash.new { |h,k| h[k] = {} }
57
59
  end
58
60
 
59
61
  # Invoke the pre_run_check hook in every resource in the catalog.
@@ -175,9 +177,9 @@ class Puppet::Transaction
175
177
  if resource.is_a?(Puppet::Type::Component)
176
178
  Puppet.warning _("Somehow left a component in the relationship graph")
177
179
  else
178
- resource.info _("Starting to evaluate the resource") if Puppet[:evaltrace] and @catalog.host_config?
180
+ resource.info _("Starting to evaluate the resource") if Puppet[:evaltrace] && @catalog.host_config?
179
181
  seconds = thinmark { block.call(resource) }
180
- resource.info _("Evaluated in %{seconds} seconds") % { seconds: "%0.2f" % seconds } if Puppet[:evaltrace] and @catalog.host_config?
182
+ resource.info _("Evaluated in %{seconds} seconds") % { seconds: "%0.2f" % seconds } if Puppet[:evaltrace] && @catalog.host_config?
181
183
  end
182
184
  end
183
185
 
@@ -231,7 +233,11 @@ class Puppet::Transaction
231
233
 
232
234
  def prefetch_if_necessary(resource)
233
235
  provider_class = resource.provider.class
234
- return unless provider_class.respond_to?(:prefetch) and !prefetched_providers[resource.type][provider_class.name]
236
+ if !provider_class.respond_to?(:prefetch) or
237
+ prefetched_providers[resource.type][provider_class.name] or
238
+ prefetch_failed_providers[resource.type][provider_class.name]
239
+ return
240
+ end
235
241
 
236
242
  resources = resources_by_provider(resource.type, provider_class.name)
237
243
 
@@ -302,14 +308,20 @@ class Puppet::Transaction
302
308
  # up-front at failure time because the graph may be mutated as we
303
309
  # walk it.
304
310
  def propagate_failure(resource)
311
+
312
+ provider_class = resource.provider.class
313
+ s = resource_status(resource)
314
+ if prefetch_failed_providers[resource.type][provider_class.name] && !s.nil?
315
+ message = _("Prefetch failed for %{type_name} provider '%{name}'") % { type_name: resource.type, name: provider_class.name }
316
+ s.fail_with_event(message)
317
+ end
318
+
305
319
  failed = Set.new
306
320
  relationship_graph.direct_dependencies_of(resource).each do |dep|
307
- if (s = resource_status(dep))
308
- failed.merge(s.failed_dependencies) if s.dependency_failed?
309
- if s.failed? || s.failed_to_restart?
310
- failed.add(dep)
311
- end
312
- end
321
+ s = resource_status(dep)
322
+ next if s.nil?
323
+ failed.merge(s.failed_dependencies) if s.dependency_failed?
324
+ failed.add(dep) if s.failed? || s.failed_to_restart?
313
325
  end
314
326
  resource_status(resource).failed_dependencies = failed.to_a
315
327
  end
@@ -338,13 +350,20 @@ class Puppet::Transaction
338
350
  # types, just providers.
339
351
  def prefetch(provider_class, resources)
340
352
  type_name = provider_class.resource_type.name
341
- return if @prefetched_providers[type_name][provider_class.name]
353
+ return if @prefetched_providers[type_name][provider_class.name] ||
354
+ @prefetch_failed_providers[type_name][provider_class.name]
342
355
  Puppet.debug "Prefetching #{provider_class.name} resources for #{type_name}"
343
356
  begin
344
357
  provider_class.prefetch(resources)
345
- rescue LoadError, Puppet::MissingCommand => detail
358
+ rescue Exception => detail
359
+ if !detail.is_a?(LoadError) && !detail.is_a?(Puppet::MissingCommand)
360
+ raise unless Puppet.settings[:future_features]
361
+
362
+ @prefetch_failed_providers[type_name][provider_class.name] = true
363
+ end
346
364
  #TRANSLATORS `prefetch` is a function name and should not be translated
347
- Puppet.log_exception(detail, _("Could not prefetch %{type_name} provider '%{name}': %{detail}") % { type_name: type_name, name: provider_class.name, detail: detail })
365
+ message = _("Could not prefetch %{type_name} provider '%{name}': %{detail}") % { type_name: type_name, name: provider_class.name, detail: detail }
366
+ Puppet.log_exception(detail, message)
348
367
  end
349
368
  @prefetched_providers[type_name][provider_class.name] = true
350
369
  end
@@ -355,7 +374,7 @@ class Puppet::Transaction
355
374
 
356
375
  # Is the resource currently scheduled?
357
376
  def scheduled?(resource)
358
- self.ignoreschedules or resource_harness.scheduled?(resource)
377
+ self.ignoreschedules || resource_harness.scheduled?(resource)
359
378
  end
360
379
 
361
380
  # Should this resource be skipped?
@@ -374,6 +393,10 @@ class Puppet::Transaction
374
393
  unless resource.class == Puppet::Type.type(:whit) then
375
394
  resource.warning _("Skipping because of failed dependencies")
376
395
  end
396
+ elsif resource_status(resource).failed? &&
397
+ @prefetch_failed_providers[resource.type][resource.provider.class.name]
398
+ #Do not try to evaluate a resource with a known failed provider
399
+ resource.warning _("Skipping because provider prefetch failed")
377
400
  elsif resource.virtual?
378
401
  resource.debug "Skipping because virtual"
379
402
  elsif !host_and_device_resource?(resource) && resource.appliable_to_host? && for_network_device
@@ -12,7 +12,7 @@ Puppet::Type.newtype(:cron) do
12
12
  by Puppet with cron resources.
13
13
 
14
14
  If an existing crontab entry happens to match the scheduling and command of a
15
- cron resource that has never been synched, Puppet will defer to the existing
15
+ cron resource that has never been synced, Puppet will defer to the existing
16
16
  crontab entry and will not create a new entry tagged with the `# Puppet Name: `
17
17
  comment.
18
18
 
@@ -15,6 +15,12 @@ Puppet::Type.type(:file).newparam(:checksum) do
15
15
  Puppet[:digest_algorithm].to_sym
16
16
  end
17
17
 
18
+ validate do |value|
19
+ if Puppet::Util::Platform.fips_enabled? && (value == :md5 || value == :md5lite)
20
+ raise ArgumentError, _("MD5 is not supported in FIPS mode")
21
+ end
22
+ end
23
+
18
24
  def sum(content)
19
25
  content = content.is_a?(Puppet::Pops::Types::PBinaryType::Binary) ? content.binary_buffer : content
20
26
  type = digest_algorithm()
@@ -16,9 +16,6 @@ module Puppet
16
16
  that is, other mount points higher up in the filesystem --- the child
17
17
  mount will autorequire them.
18
18
 
19
- **Autorequires:** If Puppet is managing a `File` resource for the mount
20
- point of a mount resource, the mount will autorequire it.
21
-
22
19
  **Autobefores:** If Puppet is managing any child file paths of a mount
23
20
  point, the mount resource will autobefore them."
24
21
 
@@ -303,12 +300,6 @@ module Puppet
303
300
  dependencies[0..-2]
304
301
  end
305
302
 
306
- # Ensure that the mountpoint is created first
307
- autorequire(:file) do
308
- dependencies = []
309
- dependencies.unshift @parameters[:name].value
310
- end
311
-
312
303
  # Autobefore the mount point's child file paths
313
304
  autobefore(:file) do
314
305
  dependencies = []
@@ -22,7 +22,7 @@ module Puppet::Util::CharacterEncoding
22
22
  Puppet.debug(_("%{value} is already labeled as UTF-8 but this encoding is invalid. It cannot be transcoded by Puppet.") %
23
23
  { value: string.dump })
24
24
  end
25
- # String is aleady valid UTF-8 - noop
25
+ # String is already valid UTF-8 - noop
26
26
  return string_copy
27
27
  else
28
28
  # If the string comes to us as BINARY encoded, we don't know what it
@@ -47,7 +47,7 @@ module Puppet::Util::CharacterEncoding
47
47
  end
48
48
 
49
49
  # Given a string, tests if that string's bytes represent valid UTF-8, and if
50
- # so return a copy of the string with external enocding set to UTF-8. Does
50
+ # so return a copy of the string with external encoding set to UTF-8. Does
51
51
  # not modify the byte representation of the string. If the string does not
52
52
  # represent valid UTF-8, does not set the external encoding.
53
53
  #