bolt 0.20.5 → 0.20.6

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 (42) hide show
  1. checksums.yaml +4 -4
  2. data/bolt-modules/boltlib/lib/puppet/datatypes/target.rb +1 -1
  3. data/lib/bolt/analytics.rb +160 -0
  4. data/lib/bolt/cli.rb +14 -4
  5. data/lib/bolt/executor.rb +15 -2
  6. data/lib/bolt/pal.rb +3 -1
  7. data/lib/bolt/puppetdb/config.rb +9 -4
  8. data/lib/bolt/transport/local.rb +3 -2
  9. data/lib/bolt/transport/orch.rb +1 -1
  10. data/lib/bolt/transport/orch/connection.rb +1 -0
  11. data/lib/bolt/transport/ssh.rb +7 -2
  12. data/lib/bolt/transport/ssh/connection.rb +39 -19
  13. data/lib/bolt/transport/winrm.rb +1 -0
  14. data/lib/bolt/transport/winrm/connection.rb +3 -0
  15. data/lib/bolt/util.rb +5 -0
  16. data/lib/bolt/version.rb +1 -1
  17. data/lib/bolt_ext/puppetdb_inventory.rb +2 -1
  18. data/vendored/puppet/lib/puppet/defaults.rb +15 -1
  19. data/vendored/puppet/lib/puppet/pops/loader/static_loader.rb +0 -14
  20. data/vendored/puppet/lib/puppet/pops/pcore.rb +1 -1
  21. data/vendored/puppet/lib/puppet/type/file/mode.rb +1 -1
  22. data/vendored/require_vendored.rb +0 -2
  23. metadata +3 -21
  24. data/vendored/puppet/lib/puppet/external/nagios.rb +0 -46
  25. data/vendored/puppet/lib/puppet/external/nagios/base.rb +0 -472
  26. data/vendored/puppet/lib/puppet/external/nagios/parser.rb +0 -400
  27. data/vendored/puppet/lib/puppet/provider/naginator.rb +0 -63
  28. data/vendored/puppet/lib/puppet/type/nagios_command.rb +0 -3
  29. data/vendored/puppet/lib/puppet/type/nagios_contact.rb +0 -3
  30. data/vendored/puppet/lib/puppet/type/nagios_contactgroup.rb +0 -3
  31. data/vendored/puppet/lib/puppet/type/nagios_host.rb +0 -3
  32. data/vendored/puppet/lib/puppet/type/nagios_hostdependency.rb +0 -3
  33. data/vendored/puppet/lib/puppet/type/nagios_hostescalation.rb +0 -3
  34. data/vendored/puppet/lib/puppet/type/nagios_hostextinfo.rb +0 -3
  35. data/vendored/puppet/lib/puppet/type/nagios_hostgroup.rb +0 -3
  36. data/vendored/puppet/lib/puppet/type/nagios_service.rb +0 -3
  37. data/vendored/puppet/lib/puppet/type/nagios_servicedependency.rb +0 -3
  38. data/vendored/puppet/lib/puppet/type/nagios_serviceescalation.rb +0 -3
  39. data/vendored/puppet/lib/puppet/type/nagios_serviceextinfo.rb +0 -3
  40. data/vendored/puppet/lib/puppet/type/nagios_servicegroup.rb +0 -3
  41. data/vendored/puppet/lib/puppet/type/nagios_timeperiod.rb +0 -3
  42. data/vendored/puppet/lib/puppet/util/nagios_maker.rb +0 -85
@@ -1,3 +0,0 @@
1
- require 'puppet/util/nagios_maker'
2
-
3
- Puppet::Util::NagiosMaker.create_nagios_type :command
@@ -1,3 +0,0 @@
1
- require 'puppet/util/nagios_maker'
2
-
3
- Puppet::Util::NagiosMaker.create_nagios_type :contact
@@ -1,3 +0,0 @@
1
- require 'puppet/util/nagios_maker'
2
-
3
- Puppet::Util::NagiosMaker.create_nagios_type :contactgroup
@@ -1,3 +0,0 @@
1
- require 'puppet/util/nagios_maker'
2
-
3
- Puppet::Util::NagiosMaker.create_nagios_type :host
@@ -1,3 +0,0 @@
1
- require 'puppet/util/nagios_maker'
2
-
3
- Puppet::Util::NagiosMaker.create_nagios_type :hostdependency
@@ -1,3 +0,0 @@
1
- require 'puppet/util/nagios_maker'
2
-
3
- Puppet::Util::NagiosMaker.create_nagios_type :hostescalation
@@ -1,3 +0,0 @@
1
- require 'puppet/util/nagios_maker'
2
-
3
- Puppet::Util::NagiosMaker.create_nagios_type :hostextinfo
@@ -1,3 +0,0 @@
1
- require 'puppet/util/nagios_maker'
2
-
3
- Puppet::Util::NagiosMaker.create_nagios_type :hostgroup
@@ -1,3 +0,0 @@
1
- require 'puppet/util/nagios_maker'
2
-
3
- Puppet::Util::NagiosMaker.create_nagios_type :service
@@ -1,3 +0,0 @@
1
- require 'puppet/util/nagios_maker'
2
-
3
- Puppet::Util::NagiosMaker.create_nagios_type :servicedependency
@@ -1,3 +0,0 @@
1
- require 'puppet/util/nagios_maker'
2
-
3
- Puppet::Util::NagiosMaker.create_nagios_type :serviceescalation
@@ -1,3 +0,0 @@
1
- require 'puppet/util/nagios_maker'
2
-
3
- Puppet::Util::NagiosMaker.create_nagios_type :serviceextinfo
@@ -1,3 +0,0 @@
1
- require 'puppet/util/nagios_maker'
2
-
3
- Puppet::Util::NagiosMaker.create_nagios_type :servicegroup
@@ -1,3 +0,0 @@
1
- require 'puppet/util/nagios_maker'
2
-
3
- Puppet::Util::NagiosMaker.create_nagios_type :timeperiod
@@ -1,85 +0,0 @@
1
- require 'puppet/external/nagios'
2
- require 'puppet/external/nagios/base'
3
- require 'puppet/provider/naginator'
4
-
5
- module Puppet::Util::NagiosMaker
6
- # Create a new nagios type, using all of the parameters
7
- # from the parser.
8
- def self.create_nagios_type(name)
9
- name = name.to_sym
10
- full_name = ("nagios_#{name}").to_sym
11
-
12
- raise Puppet::DevError, _("No nagios type for %{name}") % { name: name } unless nagtype = Nagios::Base.type(name)
13
-
14
- type = Puppet::Type.newtype(full_name) do
15
-
16
- # Generate a file resource if necessary.
17
- #
18
- # @see Puppet::Type::File and its properties owner, group and mode.
19
- def generate
20
- return nil unless self[:owner] or self[:group] or self[:mode]
21
- props = { :name => self[:target] }
22
- [ :owner, :group, :mode ].each do |prop|
23
- props[prop] = self[prop] if self[prop]
24
- end
25
- Puppet::Type.type(:file).new(props)
26
- end
27
-
28
- end
29
-
30
- type.ensurable
31
-
32
- type.newparam(nagtype.namevar, :namevar => true) do
33
- desc "The name of this nagios_#{nagtype.name} resource."
34
- end
35
-
36
- [ :owner, :group, :mode].each do |fileprop|
37
- type.newparam(fileprop) do
38
- desc "The desired #{fileprop} of the config file for this nagios_#{nagtype.name} resource.
39
-
40
- NOTE: If the target file is explicitly managed by a file resource in your manifest,
41
- this parameter has no effect. If a parent directory of the target is managed by
42
- a recursive file resource, this limitation does not apply (i.e., this parameter
43
- takes precedence, and if purge is used, the target file is exempt)."
44
- end
45
- end
46
-
47
- # We deduplicate the parameters because it makes sense to allow Naginator to have dupes.
48
- nagtype.parameters.uniq.each do |param|
49
- next if param == nagtype.namevar
50
-
51
- # We can't turn these parameter names into constants, so at least for now they aren't
52
- # supported.
53
- next if param.to_s =~ /^[0-9]/
54
-
55
- type.newproperty(param) do
56
- desc "Nagios configuration file parameter."
57
- end
58
- end
59
-
60
- type.newproperty(:target) do
61
- desc 'The target.'
62
-
63
- defaultto do
64
- resource.class.defaultprovider.default_target
65
- end
66
- end
67
-
68
- target = "/etc/nagios/#{full_name.to_s}.cfg"
69
- provider = type.provide(:naginator, :parent => Puppet::Provider::Naginator, :default_target => target) {}
70
- provider.nagios_type
71
-
72
- type.desc "The Nagios type #{name.to_s}. This resource type is autogenerated using the
73
- model developed in Naginator, and all of the Nagios types are generated using the
74
- same code and the same library.
75
-
76
- This type generates Nagios configuration statements in Nagios-parseable configuration
77
- files. By default, the statements will be added to `#{target}`, but
78
- you can send them to a different file by setting their `target` attribute.
79
-
80
- You can purge Nagios resources using the `resources` type, but *only*
81
- in the default file locations. This is an architectural limitation.
82
-
83
- "
84
- end
85
- end