bolt 2.0.0 → 2.0.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/lib/bolt/cli.rb +5 -1
- data/lib/bolt/inventory/group.rb +7 -3
- data/lib/bolt/transport/ssh.rb +5 -0
- data/lib/bolt/version.rb +1 -1
- data/lib/bolt_spec/run.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30a51dcd7670a136af567ff1778431fd36801d05c8c45345093df6602e877385
|
4
|
+
data.tar.gz: 98a234f0f9f47c860d59d0a34de317d9f9e9b20935ace99ef97ec239dcbea8f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a32a48d4b957a811290e44f63ef6c2e1f3f672bf18ec51637c92601286652b5363222ebd747913e4e9a6e4936ace14e2f0a6aeea44d46923ba90a78d11d4b12
|
7
|
+
data.tar.gz: 28e5168898c9e49c694b82511ee68e89b1d409f116367fbd7200a87697259a0ab4f45c2fc1e59663de72920195d27523ddffafd6550037d6556cfbdafdcaf807
|
data/lib/bolt/cli.rb
CHANGED
@@ -583,7 +583,10 @@ module Bolt
|
|
583
583
|
inventory_file = config.inventoryfile || config.default_inventoryfile
|
584
584
|
data = Bolt::Util.read_yaml_hash(inventory_file, 'inventory')
|
585
585
|
|
586
|
+
data.delete('version') if data['version'] != 2
|
587
|
+
|
586
588
|
migrated = migrate_group(data)
|
589
|
+
|
587
590
|
ok = File.write(inventory_file, data.to_yaml) if migrated
|
588
591
|
|
589
592
|
result = if migrated && ok
|
@@ -613,7 +616,8 @@ module Bolt
|
|
613
616
|
group['targets'] = targets
|
614
617
|
end
|
615
618
|
(group['groups'] || []).each do |subgroup|
|
616
|
-
|
619
|
+
migrated_group = migrate_group(subgroup)
|
620
|
+
migrated ||= migrated_group
|
617
621
|
end
|
618
622
|
migrated
|
619
623
|
end
|
data/lib/bolt/inventory/group.rb
CHANGED
@@ -189,6 +189,9 @@ module Bolt
|
|
189
189
|
end
|
190
190
|
|
191
191
|
def resolve_string_targets(aliases, known_targets)
|
192
|
+
# Use a single copy of this because recomputing it for every target is
|
193
|
+
# prohibitively expensive for large groups
|
194
|
+
cached_local_targets = local_targets
|
192
195
|
@string_targets.each do |string_target|
|
193
196
|
# If this is the name of a target defined elsewhere, then insert the
|
194
197
|
# target into this group as just a name. Otherwise, add a new target
|
@@ -197,20 +200,21 @@ module Bolt
|
|
197
200
|
@unresolved_targets[string_target] = { 'name' => string_target }
|
198
201
|
# If this is an alias for an existing target, then add it to this group
|
199
202
|
elsif (canonical_name = aliases[string_target])
|
200
|
-
if
|
203
|
+
if cached_local_targets.include?(canonical_name)
|
201
204
|
@logger.warn("Ignoring duplicate target in #{@name}: #{canonical_name}")
|
202
205
|
else
|
203
206
|
@unresolved_targets[canonical_name] = { 'name' => canonical_name }
|
207
|
+
cached_local_targets << canonical_name
|
204
208
|
end
|
205
209
|
# If it's not the name or alias of an existing target, then make a
|
206
210
|
# new target using the string as the URI
|
207
|
-
elsif
|
211
|
+
elsif cached_local_targets.include?(string_target)
|
208
212
|
@logger.warn("Ignoring duplicate target in #{@name}: #{string_target}")
|
209
213
|
else
|
210
214
|
@unresolved_targets[string_target] = { 'uri' => string_target }
|
215
|
+
cached_local_targets << string_target
|
211
216
|
end
|
212
217
|
end
|
213
|
-
|
214
218
|
@groups.each { |g| g.resolve_string_targets(aliases, known_targets) }
|
215
219
|
end
|
216
220
|
|
data/lib/bolt/transport/ssh.rb
CHANGED
@@ -102,6 +102,11 @@ module Bolt
|
|
102
102
|
|
103
103
|
require 'net/ssh'
|
104
104
|
require 'net/scp'
|
105
|
+
begin
|
106
|
+
require 'net/ssh/krb'
|
107
|
+
rescue LoadError
|
108
|
+
logger.debug("Authentication method 'gssapi-with-mic' (Kerberos) is not available.")
|
109
|
+
end
|
105
110
|
|
106
111
|
@transport_logger = Logging.logger[Net::SSH]
|
107
112
|
@transport_logger.level = :warn
|
data/lib/bolt/version.rb
CHANGED
data/lib/bolt_spec/run.rb
CHANGED
@@ -131,7 +131,7 @@ module BoltSpec
|
|
131
131
|
# still be loaded
|
132
132
|
def self.with_runner(config_data, inventory_data)
|
133
133
|
Dir.mktmpdir do |boltdir_path|
|
134
|
-
runner = new(config_data, inventory_data, boltdir_path)
|
134
|
+
runner = new(Bolt::Util.deep_clone(config_data), Bolt::Util.deep_clone(inventory_data), boltdir_path)
|
135
135
|
yield runner
|
136
136
|
end
|
137
137
|
end
|
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.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|