openbolt 5.1.0 → 5.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 16adee6f2ee63ca8307251e4c21172c2b5757abb858fde6b785a4ad95ae682dd
4
- data.tar.gz: 1d27c4966b88c572fa32e7ad576e575c2f8df15c42fb154740d001648b8d33c9
3
+ metadata.gz: e9b0100076081c5483e86b98cea67dc2c9ed0a46ceb7b86d3883257f34b68ee8
4
+ data.tar.gz: c85b0fd26588f95757ebdf25b86ed39a3f2c16dc530b0517c4d4c6848e16440a
5
5
  SHA512:
6
- metadata.gz: 51f3c418134ed410ae9b853ca94dda21101e0f1e53466f6b3152ee39cbc0d743250eab910e5791ebc0014a53b18a84bfa48e8606d5755fc606b103735cd43609
7
- data.tar.gz: 5e4bf2586950d1268c7c69ca4d14b0be64b12c2db6f5279622773f185c6fb8674d02a24486c1ea1148e2bbce32655c3de318e19cf011c179fbbae31259a8964a
6
+ metadata.gz: 89b8e8179220b89ca34d44682c9a2e83723dfc7d06ffd09ed7bbaff010cb6e4635d837451f9131eea95917151b81c74e6f65912fd77c8cfc8d694e1748f236f9
7
+ data.tar.gz: 6158a6c97dad745b1ad1a0ec9a745bd44ce59f1a8ad0e636c3df2f39cd07f962b28a1a19d6109dc94d68c3938e18cb5acd498ceea12a3fff094327390ab776a8
data/Puppetfile CHANGED
@@ -6,27 +6,27 @@ moduledir File.join(File.dirname(__FILE__), 'modules')
6
6
 
7
7
  # Core modules used by 'apply'
8
8
  mod 'puppetlabs-service', '3.1.0'
9
- mod 'puppetlabs-puppet_agent', '4.25.0'
9
+ mod 'puppet-openvox_bootstrap', '1.2.0'
10
10
  mod 'puppetlabs-facts', '1.7.0'
11
11
 
12
- # puppetlabs-puppet_agent deps
12
+ # Other core Puppet modules
13
13
  mod 'puppetlabs-inifile', '6.2.0'
14
- mod 'puppetlabs-apt', '10.0.1'
14
+ mod 'puppetlabs-apt', '11.1.0'
15
15
  mod 'puppetlabs-stdlib', '9.7.0'
16
- mod 'puppetlabs-powershell', '6.0.2'
17
- mod 'puppetlabs-pwshlib', '1.2.3'
16
+ mod 'puppetlabs-powershell', '6.1.0'
17
+ mod 'puppetlabs-pwshlib', '2.0.0'
18
18
 
19
19
  # Core types and providers for Puppet 6
20
- mod 'puppetlabs-augeas_core', '1.5.0'
21
- mod 'puppetlabs-host_core', '1.3.0'
20
+ mod 'puppetlabs-augeas_core', '2.0.1'
21
+ mod 'puppetlabs-host_core', '2.0.1'
22
22
  mod 'puppetlabs-scheduled_task', '4.0.3'
23
- mod 'puppetlabs-sshkeys_core', '2.5.1'
23
+ mod 'puppetlabs-sshkeys_core', '3.0.1'
24
24
  mod 'puppetlabs-zfs_core', '1.6.1'
25
- mod 'puppetlabs-cron_core', '1.3.0'
26
- mod 'puppetlabs-mount_core', '1.3.0'
27
- mod 'puppetlabs-selinux_core', '1.4.0'
28
- mod 'puppetlabs-yumrepo_core', '2.1.0'
29
- mod 'puppetlabs-zone_core', '1.2.0'
25
+ mod 'puppetlabs-cron_core', '2.0.2'
26
+ mod 'puppetlabs-mount_core', '2.0.1'
27
+ mod 'puppetlabs-selinux_core', '2.0.1'
28
+ mod 'puppetlabs-yumrepo_core', '3.0.1'
29
+ mod 'puppetlabs-zone_core', '2.0.1'
30
30
 
31
31
  # Useful additional modules
32
32
  mod 'puppetlabs-package', '3.1.0'
@@ -3,13 +3,13 @@
3
3
  require 'bolt/logger'
4
4
  require 'bolt/task'
5
5
 
6
- # Installs the `puppet-agent` package on targets if needed, then collects facts,
6
+ # Installs the `openvox-agent` package on targets if needed, then collects facts,
7
7
  # including any custom facts found in Bolt's module path. The package is
8
8
  # installed using either the configured plugin or the `task` plugin with the
9
- # `puppet_agent::install` task.
9
+ # `openvox_bootstrap::install` task.
10
10
  #
11
11
  # Agent installation will be skipped if the target includes the `puppet-agent`
12
- # feature, either as a property of its transport (PCP) or by explicitly setting
12
+ # feature, either as a property of its transport or by explicitly setting
13
13
  # it as a feature in Bolt's inventory.
14
14
  #
15
15
  # > **Note:** Not available in apply block
@@ -6,7 +6,7 @@ require 'bolt/task'
6
6
  # The results are returned as a list of hashes representing each resource.
7
7
  #
8
8
  # Requires the Puppet Agent be installed on the target, which can be accomplished with apply_prep
9
- # or by directly running the `puppet_agent::install` task. In order to be able to reference types without
9
+ # or by directly running the `openvox_bootstrap::install` task. In order to be able to reference types without
10
10
  # string quoting (for example `get_resources($target, Package)` instead of `get_resources($target, 'Package')`),
11
11
  # run the command `bolt puppetfile generate-types` to generate type references in `$Boldir/.resource_types`.
12
12
  #
@@ -5,7 +5,6 @@ require 'bolt/error'
5
5
  # Makes a query to [puppetdb](https://puppet.com/docs/puppetdb/latest/index.html)
6
6
  # using Bolt's PuppetDB client.
7
7
  Puppet::Functions.create_function(:puppetdb_query) do
8
- # rubocop:disable Layout/LineLength
9
8
  # Make a query to PuppetDB.
10
9
  #
11
10
  # @param query A PQL query.
@@ -13,13 +12,11 @@ Puppet::Functions.create_function(:puppetdb_query) do
13
12
  # @return Results of the PuppetDB query.
14
13
  # @example Request certnames for all nodes
15
14
  # puppetdb_query('nodes[certname] {}')
16
- # rubocop:enable Layout/LineLength
17
15
  dispatch :make_query do
18
16
  param 'Variant[String, Array[Data]]', :query
19
17
  return_type 'Array[Data]'
20
18
  end
21
19
 
22
- # rubocop:disable Layout/LineLength
23
20
  # Make a query to a named PuppetDB instance.
24
21
  #
25
22
  # @param query A PQL query.
@@ -28,7 +25,6 @@ Puppet::Functions.create_function(:puppetdb_query) do
28
25
  # @return Results of the PuppetDB query.
29
26
  # @example Request certnames for all nodes using a named PuppetDB instance
30
27
  # puppetdb_query('nodes[certname] {}', 'instance-1')
31
- # rubocop:enable Layout/LineLength
32
28
  dispatch :make_query_with_instance do
33
29
  param 'Variant[String, Array[Data]]', :query
34
30
  param 'String', :instance
@@ -1,5 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # None of this currently works, as it's based on Perforce's old GA setup.
4
+ # It is functionally disabled here, but the code remains in case we want
5
+ # to revive it for Vox Pupuli later.
3
6
  require_relative '../bolt/util'
4
7
  require_relative '../bolt/version'
5
8
  require 'find'
@@ -30,6 +33,8 @@ module Bolt
30
33
  }.freeze
31
34
 
32
35
  def self.build_client(enabled = true)
36
+ # Remove if we fix this for Vox analytics
37
+ config = { 'disabled' => true }
33
38
  begin
34
39
  config_file = config_path
35
40
  config = enabled ? load_config(config_file) : {}
@@ -38,7 +43,8 @@ module Bolt
38
43
  end
39
44
 
40
45
  if !enabled || config['disabled'] || ENV['BOLT_DISABLE_ANALYTICS']
41
- Bolt::Logger.debug "Analytics opt-out is set, analytics will be disabled"
46
+ # Uncomment if we fix this for Vox analytics
47
+ # Bolt::Logger.debug "Analytics opt-out is set, analytics will be disabled"
42
48
  NoopClient.new
43
49
  else
44
50
  unless config.key?('user-id')
@@ -76,7 +82,8 @@ module Bolt
76
82
  if File.exist?(filename)
77
83
  Bolt::Util.read_optional_yaml_hash(filename, 'analytics')
78
84
  else
79
- unless ENV['BOLT_DISABLE_ANALYTICS']
85
+ # Remove || true if we fix this for Vox analytics
86
+ unless ENV['BOLT_DISABLE_ANALYTICS'] || true
80
87
  msg = <<~ANALYTICS
81
88
  Bolt collects data about how you use it. You can opt out of providing this data.
82
89
  To learn how to disable data collection, or see what data Bolt collects and why,
@@ -52,13 +52,11 @@ module Bolt
52
52
  missing_keys = expected_report_keys.reject { |k| result.value.include?(k) }
53
53
 
54
54
  unless missing_keys.empty?
55
- if result['_output']
56
- # rubocop:disable Layout/LineLength
57
- msg = "Report result contains an '_output' key. Catalog application might have printed extraneous output to stdout: #{result['_output']}"
58
- # rubocop:enable Layout/LineLength
59
- else
60
- msg = "Report did not contain all expected keys missing: #{missing_keys.join(', ')}"
61
- end
55
+ msg = if result['_output']
56
+ "Report result contains an '_output' key. Catalog application might have printed extraneous output to stdout: #{result['_output']}"
57
+ else
58
+ "Report did not contain all expected keys missing: #{missing_keys.join(', ')}"
59
+ end
62
60
 
63
61
  { 'msg' => msg,
64
62
  'kind' => 'bolt/invalid-report' }
data/lib/bolt/cli.rb CHANGED
@@ -106,15 +106,6 @@ module Bolt
106
106
  # help text
107
107
  options[:subcommand] = nil unless COMMANDS.include?(options[:subcommand])
108
108
 
109
- if Bolt::Util.first_run?
110
- FileUtils.touch(Bolt::Util.first_runs_free)
111
-
112
- if options[:subcommand].nil? && $stdout.isatty
113
- welcome_message
114
- raise Bolt::CLIExit
115
- end
116
- end
117
-
118
109
  # Update the parser for the subcommand (or lack thereof)
119
110
  parser.update
120
111
  puts parser.help
@@ -165,52 +156,6 @@ module Bolt
165
156
  end
166
157
  end
167
158
 
168
- # TODO: Move this to the parser.
169
- #
170
- # Print a welcome message when users first install Bolt and run `bolt`,
171
- # `bolt help` or `bolt --help`.
172
- #
173
- private def welcome_message
174
- bolt = <<~BOLT
175
- `.::-`
176
- `.-:///////-.`
177
- `-:////:. `-:///:- /ooo. .ooo/
178
- `.-:///::///:-` `-//: ymmm- :mmmy .---.
179
- :///:-. `.:////. -//: ymmm- :mmmy +mmm+
180
- ://. ///. -//: ymmm--/++/- `-/++/:` :mmmy-:smmms::-
181
- ://. ://. .://: ymmmdmmmmmmdo` .smmmmmmmmh: :mmmysmmmmmmmms
182
- ://. ://:///:-. ymmmh/--/hmmmy -mmmd/-.:hmmm+:mmmy.-smmms--.
183
- ://:.` .-////:-` ymmm- ymmm:hmmm- `dmmm/mmmy +mmm+
184
- `-:///:-..:///:-.` ymmm- ommm/dmmm` hmmm+mmmy +mmm+
185
- `.-:////:-` ymmm+ /mmmm.ommms` /mmmh:mmmy +mmmo
186
- `-.` ymmmmmhhmmmmd: ommmmhydmmmy`:mmmy -mmmmdhd
187
- oyyy+shddhs/` .+shddhy+- -yyyo .ohddhs
188
-
189
-
190
- BOLT
191
- example_cmd = if Bolt::Util.windows?
192
- "Invoke-BoltCommand -Command 'hostname' -Targets localhost"
193
- else
194
- "bolt command run 'hostname' --target localhost"
195
- end
196
- prev_cmd = String.new("bolt")
197
- prev_cmd << " #{@argv[0]}" unless @argv.empty?
198
-
199
- message = <<~MSG
200
- 🎉 Welcome to OpenBolt #{VERSION}
201
- 😌 We're here to help bring order to the chaos
202
- 📖 Find our documentation at https://bolt.guide
203
- 🙋 Ask a question in #bolt on https://slack.puppet.com/
204
- 🔩 Contribute at https://github.com/puppetlabs/bolt/
205
- 💡 Not sure where to start? Try "#{example_cmd}"
206
-
207
- We only print this message once. Run "#{prev_cmd}" again for help text.
208
- MSG
209
-
210
- $stdout.print "\033[36m#{bolt}\033[0m"
211
- $stdout.print message
212
- end
213
-
214
159
  # TODO: Move this to the parser.
215
160
  #
216
161
  # Validate the command. Ensure that the subcommand and action are
@@ -430,11 +430,12 @@ module Bolt
430
430
  "plugin-hooks" => {
431
431
  description: "A map of [plugin hooks](writing_plugins.md#hooks) and which plugins a hook should use. " \
432
432
  "The only configurable plugin hook is `puppet_library`, which can use two possible plugins: " \
433
- "[`puppet_agent`](https://github.com/puppetlabs/puppetlabs-puppet_agent#puppet_agentinstall) " \
433
+ "[`openvox_bootstrap`](https://github.com/voxpupuli/puppet-openvox_bootstrap#openvox_boostrapinstall) " \
434
434
  "and [`task`](using_plugins.md#task).",
435
435
  type: Hash,
436
436
  _plugin: true,
437
- _example: { "puppet_library" => { "plugin" => "puppet_agent", "version" => "6.15.0", "_run_as" => "root" } }
437
+ _example: { "puppet_library" => { "plugin" => "openvox_bootstrap", "version" => "1.2.0",
438
+ "_run_as" => "root" } }
438
439
  },
439
440
  "plugins" => {
440
441
  description: "A map of plugins and their configuration data, where each key is the name of a plugin and " \
@@ -256,7 +256,7 @@ module Bolt
256
256
 
257
257
  # DEPRECATION : remove this before finalization
258
258
  if input.key?('target-lookups')
259
- msg = "'target-lookups' are no longer a separate key. Merge 'target-lookups' and 'targets' lists and replace 'plugin' with '_plugin'" # rubocop:disable Layout/LineLength
259
+ msg = "'target-lookups' are no longer a separate key. Merge 'target-lookups' and 'targets' lists and replace 'plugin' with '_plugin'"
260
260
  raise ValidationError.new(msg, @name)
261
261
  end
262
262
 
data/lib/bolt/pal.rb CHANGED
@@ -795,7 +795,7 @@ module Bolt
795
795
  end
796
796
 
797
797
  def lookup(key, targets, inventory, executor, plan_vars: {})
798
- # Install the puppet-agent package and collect facts. Facts are
798
+ # Install the openvox-agent package and collect facts. Facts are
799
799
  # automatically added to the targets.
800
800
  in_plan_compiler(executor, inventory, nil) do |compiler|
801
801
  compiler.call_function('apply_prep', targets)
data/lib/bolt/plugin.rb CHANGED
@@ -130,7 +130,7 @@ module Bolt
130
130
  RUBY_PLUGINS = %w[task prompt env_var puppetdb puppet_connect_data].freeze
131
131
  BUILTIN_PLUGINS = %w[task terraform pkcs7 prompt vault aws_inventory puppetdb azure_inventory
132
132
  yaml env_var gcloud_inventory].freeze
133
- DEFAULT_PLUGIN_HOOKS = { 'puppet_library' => { 'plugin' => 'puppet_agent', 'stop_service' => true } }.freeze
133
+ DEFAULT_PLUGIN_HOOKS = { 'puppet_library' => { 'plugin' => 'openvox_bootstrap', 'stop_service' => true } }.freeze
134
134
 
135
135
  attr_reader :pal, :plugin_context
136
136
  attr_writer :plugin_hooks
data/lib/bolt/util.rb CHANGED
@@ -80,26 +80,6 @@ module Bolt
80
80
  File.exist?(path) ? read_yaml_hash(path, file_name) : {}
81
81
  end
82
82
 
83
- def first_runs_free
84
- # If this fails, use the system path instead
85
- FileUtils.mkdir_p(Bolt::Config.user_path)
86
- Bolt::Config.user_path + '.first_runs_free'
87
- rescue StandardError
88
- begin
89
- # If using the system path fails, then don't bother with the welcome
90
- # message
91
- FileUtils.mkdir_p(Bolt::Config.system_path)
92
- Bolt::Config.system_path + '.first_runs_free'
93
- rescue StandardError
94
- nil
95
- end
96
- end
97
-
98
- def first_run?
99
- !first_runs_free.nil? &&
100
- !File.exist?(first_runs_free)
101
- end
102
-
103
83
  # If Puppet is loaded, we aleady have the path to the module and should
104
84
  # just get it. This takes the path to a file provided by the user and a
105
85
  # Puppet Parser scope object and tries to find the file, either as an
data/lib/bolt/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bolt
4
- VERSION = '5.1.0'
4
+ VERSION = '5.3.0'
5
5
  end
@@ -78,11 +78,11 @@ plan puppet_connect::test_input_data(TargetSpec $targets = 'all') {
78
78
  }
79
79
  }
80
80
 
81
- # Bolt defaults to using the "module" based form of the puppet_agent plugin. Connect defaults
81
+ # OpenBolt defaults to using the "module" based form of the openvox_bootstrap plugin. Connect defaults
82
82
  # to using the "task" based form as *only* the task based form in supported in Connect. This check
83
83
  # ensures that if the default is not being used, only task based plugins are allowed.
84
84
  $plugin = $target.plugin_hooks["puppet_library"]
85
- $user_configured_plugin = $plugin != { "plugin"=> "puppet_agent", "stop_service"=> true }
85
+ $user_configured_plugin = $plugin != { "plugin"=> "openvox_bootstrap", "stop_service"=> true }
86
86
  if ($user_configured_plugin and $plugin["plugin"] != "task"){
87
87
  fail_plan("Only task plugins are acceptable for puppet_library hook")
88
88
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openbolt
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.0
4
+ version: 5.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenVox Project
@@ -111,14 +111,14 @@ dependencies:
111
111
  requirements:
112
112
  - - "~>"
113
113
  - !ruby/object:Gem::Version
114
- version: '2.12'
114
+ version: '2.6'
115
115
  type: :runtime
116
116
  prerelease: false
117
117
  version_requirements: !ruby/object:Gem::Requirement
118
118
  requirements:
119
119
  - - "~>"
120
120
  - !ruby/object:Gem::Version
121
- version: '2.12'
121
+ version: '2.6'
122
122
  - !ruby/object:Gem::Dependency
123
123
  name: jwt
124
124
  requirement: !ruby/object:Gem::Requirement
@@ -147,6 +147,26 @@ dependencies:
147
147
  - - "~>"
148
148
  - !ruby/object:Gem::Version
149
149
  version: '2.2'
150
+ - !ruby/object:Gem::Dependency
151
+ name: minitar
152
+ requirement: !ruby/object:Gem::Requirement
153
+ requirements:
154
+ - - ">="
155
+ - !ruby/object:Gem::Version
156
+ version: '0.6'
157
+ - - "<"
158
+ - !ruby/object:Gem::Version
159
+ version: '2.0'
160
+ type: :runtime
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0.6'
167
+ - - "<"
168
+ - !ruby/object:Gem::Version
169
+ version: '2.0'
150
170
  - !ruby/object:Gem::Dependency
151
171
  name: net-scp
152
172
  requirement: !ruby/object:Gem::Requirement
@@ -307,14 +327,14 @@ dependencies:
307
327
  name: terminal-table
308
328
  requirement: !ruby/object:Gem::Requirement
309
329
  requirements:
310
- - - "~>"
330
+ - - ">="
311
331
  - !ruby/object:Gem::Version
312
332
  version: '3.0'
313
333
  type: :runtime
314
334
  prerelease: false
315
335
  version_requirements: !ruby/object:Gem::Requirement
316
336
  requirements:
317
- - - "~>"
337
+ - - ">="
318
338
  - !ruby/object:Gem::Version
319
339
  version: '3.0'
320
340
  - !ruby/object:Gem::Dependency
@@ -433,26 +453,6 @@ dependencies:
433
453
  - - "~>"
434
454
  - !ruby/object:Gem::Version
435
455
  version: 5.0.0
436
- - !ruby/object:Gem::Dependency
437
- name: minitar
438
- requirement: !ruby/object:Gem::Requirement
439
- requirements:
440
- - - ">="
441
- - !ruby/object:Gem::Version
442
- version: '0.6'
443
- - - "<"
444
- - !ruby/object:Gem::Version
445
- version: '2.0'
446
- type: :runtime
447
- prerelease: false
448
- version_requirements: !ruby/object:Gem::Requirement
449
- requirements:
450
- - - ">="
451
- - !ruby/object:Gem::Version
452
- version: '0.6'
453
- - - "<"
454
- - !ruby/object:Gem::Version
455
- version: '2.0'
456
456
  description: Execute commands remotely over SSH and WinRM
457
457
  email:
458
458
  - openvox@voxpupuli.org