bolt 3.7.0 → 3.7.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.
- checksums.yaml +4 -4
- data/bolt-modules/boltlib/lib/puppet/datatypes/applyresult.rb +26 -0
- data/bolt-modules/boltlib/lib/puppet/datatypes/containerresult.rb +27 -0
- data/bolt-modules/boltlib/lib/puppet/datatypes/resourceinstance.rb +43 -0
- data/bolt-modules/boltlib/lib/puppet/datatypes/result.rb +29 -0
- data/bolt-modules/boltlib/lib/puppet/datatypes/resultset.rb +34 -0
- data/bolt-modules/boltlib/lib/puppet/datatypes/target.rb +55 -0
- data/bolt-modules/boltlib/lib/puppet/functions/add_to_group.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/apply_prep.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/parallelize.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/remove_from_group.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/write_file.rb +1 -0
- data/bolt-modules/ctrl/lib/puppet/functions/ctrl/do_until.rb +2 -0
- data/guides/guide.txt +17 -0
- data/guides/links.txt +13 -0
- data/guides/targets.txt +13 -15
- data/guides/transports.txt +23 -0
- data/lib/bolt/bolt_option_parser.rb +296 -210
- data/lib/bolt/cli.rb +1 -1
- data/lib/bolt/module_installer/specs/git_spec.rb +10 -6
- data/lib/bolt/outputter/human.rb +1 -1
- data/lib/bolt/transport/docker/connection.rb +2 -2
- data/lib/bolt/transport/ssh/connection.rb +3 -6
- data/lib/bolt/version.rb +1 -1
- metadata +5 -2
data/lib/bolt/cli.rb
CHANGED
@@ -67,8 +67,7 @@ module Bolt
|
|
67
67
|
elsif git.start_with?('https://github.com')
|
68
68
|
git.split('https://github.com/').last.split('.git').first
|
69
69
|
else
|
70
|
-
raise Bolt::ValidationError,
|
71
|
-
"Invalid git source: #{git}. Only GitHub modules are supported."
|
70
|
+
raise Bolt::ValidationError, invalid_git_msg(git)
|
72
71
|
end
|
73
72
|
|
74
73
|
[git, repo]
|
@@ -89,6 +88,14 @@ module Bolt
|
|
89
88
|
}
|
90
89
|
end
|
91
90
|
|
91
|
+
# Returns an error message that the provided repo is not a git repo or
|
92
|
+
# is private.
|
93
|
+
#
|
94
|
+
private def invalid_git_msg(repo_name)
|
95
|
+
"#{repo_name} is not a public GitHub repository. See https://pup.pt/no-resolve "\
|
96
|
+
"for information on how to install this module."
|
97
|
+
end
|
98
|
+
|
92
99
|
# Returns a PuppetfileResolver::Model::GitModule object for resolving.
|
93
100
|
#
|
94
101
|
def to_resolver_module
|
@@ -157,10 +164,7 @@ module Bolt
|
|
157
164
|
|
158
165
|
raise Bolt::Error.new(message, 'bolt/github-api-rate-limit-error')
|
159
166
|
when Net::HTTPNotFound
|
160
|
-
raise Bolt::Error.new(
|
161
|
-
"#{git} is not a git repository.",
|
162
|
-
"bolt/missing-git-repository-error"
|
163
|
-
)
|
167
|
+
raise Bolt::Error.new(invalid_git_msg(git), "bolt/missing-git-repository-error")
|
164
168
|
else
|
165
169
|
raise Bolt::Error.new(
|
166
170
|
"Ref #{ref} at #{git} is not a commit, tag, or branch.",
|
data/lib/bolt/outputter/human.rb
CHANGED
@@ -293,7 +293,7 @@ module Bolt
|
|
293
293
|
end
|
294
294
|
|
295
295
|
def print_tasks(tasks, modulepath)
|
296
|
-
command = Bolt::Util.powershell? ? 'Get-BoltTask -
|
296
|
+
command = Bolt::Util.powershell? ? 'Get-BoltTask -Name <TASK NAME>' : 'bolt task show <TASK NAME>'
|
297
297
|
|
298
298
|
tasks = tasks.map do |name, description|
|
299
299
|
description = truncate(description, 72)
|
@@ -46,8 +46,8 @@ module Bolt
|
|
46
46
|
def connect
|
47
47
|
# We don't actually have a connection, but we do need to
|
48
48
|
# check that the container exists and is running.
|
49
|
-
output = execute_local_json_command('ps')
|
50
|
-
index = output.find_index { |item| item["ID"]
|
49
|
+
output = execute_local_json_command('ps', ['--no-trunc'])
|
50
|
+
index = output.find_index { |item| item["ID"].start_with?(target.host) || item["Names"] == target.host }
|
51
51
|
raise "Could not find a container with name or ID matching '#{target.host}'" if index.nil?
|
52
52
|
# Now find the indepth container information
|
53
53
|
output = execute_local_json_command('inspect', [output[index]["ID"]])
|
@@ -39,8 +39,6 @@ module Bolt
|
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
|
-
PAGEANT_NAME = "Pageant\0".encode(Encoding::UTF_16LE)
|
43
|
-
|
44
42
|
def connect
|
45
43
|
options = {
|
46
44
|
logger: @transport_logger,
|
@@ -115,10 +113,9 @@ module Bolt
|
|
115
113
|
options[:use_agent] = false
|
116
114
|
end
|
117
115
|
elsif Bolt::Util.windows?
|
118
|
-
|
119
|
-
#
|
120
|
-
|
121
|
-
if @find_window.call(nil, PAGEANT_NAME).to_i == 0
|
116
|
+
pageant = Net::SSH::Authentication::Pageant::Win.FindWindow("Pageant", "Pageant")
|
117
|
+
# If pageant is not running
|
118
|
+
if pageant.to_i == 0
|
122
119
|
@logger.debug { "Disabling use_agent in net-ssh: pageant process not running" }
|
123
120
|
options[:use_agent] = false
|
124
121
|
end
|
data/lib/bolt/version.rb
CHANGED
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: 3.7.
|
4
|
+
version: 3.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -450,12 +450,15 @@ files:
|
|
450
450
|
- bolt-modules/prompt/lib/puppet/functions/prompt/menu.rb
|
451
451
|
- bolt-modules/system/lib/puppet/functions/system/env.rb
|
452
452
|
- exe/bolt
|
453
|
+
- guides/guide.txt
|
453
454
|
- guides/inventory.txt
|
455
|
+
- guides/links.txt
|
454
456
|
- guides/logging.txt
|
455
457
|
- guides/module.txt
|
456
458
|
- guides/modulepath.txt
|
457
459
|
- guides/project.txt
|
458
460
|
- guides/targets.txt
|
461
|
+
- guides/transports.txt
|
459
462
|
- lib/bolt.rb
|
460
463
|
- lib/bolt/analytics.rb
|
461
464
|
- lib/bolt/applicator.rb
|