bolt 2.22.0 → 2.26.0

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 (67) hide show
  1. checksums.yaml +4 -4
  2. data/Puppetfile +1 -1
  3. data/bolt-modules/boltlib/lib/puppet/datatypes/result.rb +2 -1
  4. data/bolt-modules/boltlib/lib/puppet/functions/download_file.rb +1 -1
  5. data/bolt-modules/ctrl/lib/puppet/functions/ctrl/do_until.rb +12 -6
  6. data/bolt-modules/dir/lib/puppet/functions/dir/children.rb +1 -1
  7. data/bolt-modules/out/lib/puppet/functions/out/message.rb +1 -1
  8. data/exe/bolt +1 -0
  9. data/guides/inventory.txt +19 -0
  10. data/guides/project.txt +22 -0
  11. data/lib/bolt/analytics.rb +8 -8
  12. data/lib/bolt/applicator.rb +6 -6
  13. data/lib/bolt/bolt_option_parser.rb +47 -24
  14. data/lib/bolt/catalog.rb +4 -2
  15. data/lib/bolt/cli.rb +97 -78
  16. data/lib/bolt/config.rb +46 -24
  17. data/lib/bolt/config/options.rb +9 -6
  18. data/lib/bolt/executor.rb +10 -8
  19. data/lib/bolt/inventory.rb +8 -1
  20. data/lib/bolt/inventory/group.rb +4 -4
  21. data/lib/bolt/inventory/inventory.rb +1 -1
  22. data/lib/bolt/inventory/target.rb +1 -1
  23. data/lib/bolt/logger.rb +12 -6
  24. data/lib/bolt/outputter.rb +56 -0
  25. data/lib/bolt/outputter/human.rb +10 -9
  26. data/lib/bolt/outputter/json.rb +11 -4
  27. data/lib/bolt/outputter/logger.rb +3 -3
  28. data/lib/bolt/outputter/rainbow.rb +15 -0
  29. data/lib/bolt/pal.rb +9 -19
  30. data/lib/bolt/pal/yaml_plan/evaluator.rb +2 -2
  31. data/lib/bolt/pal/yaml_plan/transpiler.rb +11 -3
  32. data/lib/bolt/plugin/prompt.rb +3 -3
  33. data/lib/bolt/plugin/puppetdb.rb +1 -1
  34. data/lib/bolt/project.rb +32 -19
  35. data/lib/bolt/project_migrate.rb +138 -0
  36. data/lib/bolt/puppetdb/client.rb +1 -1
  37. data/lib/bolt/puppetdb/config.rb +1 -1
  38. data/lib/bolt/r10k_log_proxy.rb +1 -1
  39. data/lib/bolt/rerun.rb +1 -1
  40. data/lib/bolt/result.rb +8 -0
  41. data/lib/bolt/shell.rb +1 -1
  42. data/lib/bolt/shell/bash.rb +7 -7
  43. data/lib/bolt/task.rb +1 -1
  44. data/lib/bolt/transport/base.rb +1 -1
  45. data/lib/bolt/transport/docker/connection.rb +10 -10
  46. data/lib/bolt/transport/local/connection.rb +3 -3
  47. data/lib/bolt/transport/orch.rb +3 -3
  48. data/lib/bolt/transport/ssh.rb +1 -1
  49. data/lib/bolt/transport/ssh/connection.rb +6 -6
  50. data/lib/bolt/transport/ssh/exec_connection.rb +5 -5
  51. data/lib/bolt/transport/winrm.rb +1 -1
  52. data/lib/bolt/transport/winrm/connection.rb +9 -9
  53. data/lib/bolt/util.rb +2 -2
  54. data/lib/bolt/util/puppet_log_level.rb +4 -3
  55. data/lib/bolt/version.rb +1 -1
  56. data/lib/bolt_server/base_config.rb +1 -1
  57. data/lib/bolt_server/file_cache.rb +1 -1
  58. data/lib/bolt_server/pe/pal.rb +1 -1
  59. data/lib/bolt_server/transport_app.rb +76 -0
  60. data/lib/bolt_spec/plans.rb +1 -1
  61. data/lib/bolt_spec/plans/action_stubs.rb +1 -1
  62. data/lib/bolt_spec/run.rb +3 -0
  63. data/libexec/apply_catalog.rb +2 -2
  64. data/libexec/bolt_catalog +1 -1
  65. data/libexec/custom_facts.rb +1 -1
  66. data/libexec/query_resources.rb +1 -1
  67. metadata +9 -12
@@ -206,7 +206,7 @@ module BoltSpec
206
206
  Puppet[:tasks] = true
207
207
 
208
208
  # Ensure logger is initialized with Puppet levels so 'notice' works when running plan specs.
209
- Logging.init :debug, :info, :notice, :warn, :error, :fatal, :any
209
+ Logging.init :trace, :debug, :info, :notice, :warn, :error, :fatal, :any
210
210
  end
211
211
 
212
212
  # Provided as a class so expectations can be placed on it.
@@ -177,7 +177,7 @@ module BoltSpec
177
177
  if data['msg'] && data['kind'] && (data.keys - %w[msg kind details issue_code]).empty?
178
178
  @data[:default] = clazz.new(data['msg'], data['kind'], data['details'], data['issue_code'])
179
179
  else
180
- STDERR.puts "In the future 'error_with()' may require msg and kind, and " \
180
+ $stderr.puts "In the future 'error_with()' may require msg and kind, and " \
181
181
  "optionally accept only details and issue_code."
182
182
  @data[:default] = data
183
183
  end
@@ -8,6 +8,7 @@ require 'bolt/pal'
8
8
  require 'bolt/plugin'
9
9
  require 'bolt/puppetdb'
10
10
  require 'bolt/util'
11
+ require 'bolt/logger'
11
12
 
12
13
  # This is intended to provide a relatively stable method of executing bolt in process from tests.
13
14
  module BoltSpec
@@ -153,6 +154,8 @@ module BoltSpec
153
154
  end
154
155
 
155
156
  def initialize(config_data, inventory_data, project_path)
157
+ Bolt::Logger.initialize_logging
158
+
156
159
  @config_data = config_data || {}
157
160
  @inventory_data = inventory_data || {}
158
161
  @project_path = project_path
@@ -9,7 +9,7 @@ require 'puppet/module_tool/tar'
9
9
  require 'securerandom'
10
10
  require 'tempfile'
11
11
 
12
- args = JSON.parse(ARGV[0] ? File.read(ARGV[0]) : STDIN.read)
12
+ args = JSON.parse(ARGV[0] ? File.read(ARGV[0]) : $stdin.read)
13
13
 
14
14
  # Create temporary directories for all core Puppet settings so we don't clobber
15
15
  # existing state or read from puppet.conf. Also create a temporary modulepath.
@@ -110,7 +110,7 @@ ensure
110
110
  begin
111
111
  FileUtils.remove_dir(puppet_root)
112
112
  rescue Errno::ENOTEMPTY => e
113
- STDERR.puts("Could not cleanup temporary directory: #{e}")
113
+ $stderr.puts("Could not cleanup temporary directory: #{e}")
114
114
  end
115
115
  end
116
116
 
@@ -40,7 +40,7 @@ when "compile"
40
40
  request = if ARGV[1]
41
41
  File.open(ARGV[1]) { |fh| JSON.parse(fh.read) }
42
42
  else
43
- JSON.parse(STDIN.read)
43
+ JSON.parse($stdin.read)
44
44
  end
45
45
  begin
46
46
  catalog = Bolt::Catalog.new.compile_catalog(request)
@@ -6,7 +6,7 @@ require 'puppet'
6
6
  require 'puppet/module_tool/tar'
7
7
  require 'tempfile'
8
8
 
9
- args = JSON.parse(STDIN.read)
9
+ args = JSON.parse($stdin.read)
10
10
 
11
11
  Dir.mktmpdir do |puppet_root|
12
12
  # Create temporary directories for all core Puppet settings so we don't clobber
@@ -6,7 +6,7 @@ require 'puppet'
6
6
  require 'puppet/module_tool/tar'
7
7
  require 'tempfile'
8
8
 
9
- args = JSON.parse(STDIN.read)
9
+ args = JSON.parse($stdin.read)
10
10
 
11
11
  RESOURCE_INSTANCE = /^([^\[]+)\[([^\]]+)\]$/.freeze
12
12
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bolt
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.22.0
4
+ version: 2.26.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-10 00:00:00.000000000 Z
11
+ date: 2020-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -182,22 +182,16 @@ dependencies:
182
182
  name: puppet
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - ">="
186
- - !ruby/object:Gem::Version
187
- version: 6.16.0
188
- - - "<"
185
+ - - '='
189
186
  - !ruby/object:Gem::Version
190
- version: '7'
187
+ version: 6.18.0
191
188
  type: :runtime
192
189
  prerelease: false
193
190
  version_requirements: !ruby/object:Gem::Requirement
194
191
  requirements:
195
- - - ">="
196
- - !ruby/object:Gem::Version
197
- version: 6.16.0
198
- - - "<"
192
+ - - '='
199
193
  - !ruby/object:Gem::Version
200
- version: '7'
194
+ version: 6.18.0
201
195
  - !ruby/object:Gem::Dependency
202
196
  name: puppetfile-resolver
203
197
  requirement: !ruby/object:Gem::Requirement
@@ -437,6 +431,8 @@ files:
437
431
  - bolt-modules/prompt/lib/puppet/functions/prompt.rb
438
432
  - bolt-modules/system/lib/puppet/functions/system/env.rb
439
433
  - exe/bolt
434
+ - guides/inventory.txt
435
+ - guides/project.txt
440
436
  - lib/bolt.rb
441
437
  - lib/bolt/analytics.rb
442
438
  - lib/bolt/applicator.rb
@@ -498,6 +494,7 @@ files:
498
494
  - lib/bolt/plugin/puppetdb.rb
499
495
  - lib/bolt/plugin/task.rb
500
496
  - lib/bolt/project.rb
497
+ - lib/bolt/project_migrate.rb
501
498
  - lib/bolt/puppetdb.rb
502
499
  - lib/bolt/puppetdb/client.rb
503
500
  - lib/bolt/puppetdb/config.rb