bolt 2.15.0 → 2.16.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.
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/functions/add_facts.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/add_to_group.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/catch_errors.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/facts.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/fail_plan.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/get_resources.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/get_target.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/get_targets.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/puppetdb_fact.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/puppetdb_query.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/remove_from_group.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/resolve_references.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/resource.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/run_command.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/run_plan.rb +2 -1
- data/bolt-modules/boltlib/lib/puppet/functions/run_script.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/run_task.rb +2 -1
- data/bolt-modules/boltlib/lib/puppet/functions/set_config.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/set_feature.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/set_resources.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/set_var.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/upload_file.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/vars.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/wait_until_available.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/without_default_logging.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/bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb +2 -0
- data/bolt-modules/file/lib/puppet/functions/file/exists.rb +1 -0
- data/bolt-modules/file/lib/puppet/functions/file/join.rb +2 -0
- data/bolt-modules/file/lib/puppet/functions/file/read.rb +2 -0
- data/bolt-modules/file/lib/puppet/functions/file/readable.rb +2 -0
- data/bolt-modules/file/lib/puppet/functions/file/write.rb +2 -0
- data/bolt-modules/out/lib/puppet/functions/out/message.rb +2 -0
- data/bolt-modules/prompt/lib/puppet/functions/prompt.rb +1 -0
- data/bolt-modules/system/lib/puppet/functions/system/env.rb +2 -0
- data/lib/bolt/applicator.rb +2 -1
- data/lib/bolt/bolt_option_parser.rb +7 -7
- data/lib/bolt/cli.rb +3 -4
- data/lib/bolt/config.rb +14 -117
- data/lib/bolt/config/options.rb +321 -0
- data/lib/bolt/config/transport/base.rb +16 -16
- data/lib/bolt/config/transport/docker.rb +9 -23
- data/lib/bolt/config/transport/local.rb +6 -44
- data/lib/bolt/config/transport/options.rb +305 -0
- data/lib/bolt/config/transport/orch.rb +9 -18
- data/lib/bolt/config/transport/remote.rb +3 -6
- data/lib/bolt/config/transport/ssh.rb +55 -149
- data/lib/bolt/config/transport/winrm.rb +18 -47
- data/lib/bolt/inventory/group.rb +1 -1
- data/lib/bolt/inventory/inventory.rb +0 -14
- data/lib/bolt/inventory/target.rb +18 -5
- data/lib/bolt/pal.rb +3 -1
- data/lib/bolt/project.rb +21 -38
- data/lib/bolt/shell/bash.rb +9 -9
- data/lib/bolt/shell/powershell.rb +2 -1
- data/lib/bolt/transport/docker.rb +1 -1
- data/lib/bolt/version.rb +1 -1
- metadata +4 -2
data/lib/bolt/shell/bash.rb
CHANGED
@@ -35,7 +35,7 @@ module Bolt
|
|
35
35
|
def upload(source, destination, options = {})
|
36
36
|
running_as(options[:run_as]) do
|
37
37
|
with_tmpdir do |dir|
|
38
|
-
basename = File.basename(
|
38
|
+
basename = File.basename(source)
|
39
39
|
tmpfile = File.join(dir.to_s, basename)
|
40
40
|
conn.copy_file(source, tmpfile)
|
41
41
|
# pass over file ownership if we're using run-as to be a different user
|
@@ -332,14 +332,14 @@ module Bolt
|
|
332
332
|
end
|
333
333
|
|
334
334
|
if escalate
|
335
|
-
if use_sudo
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
335
|
+
sudo_str = if use_sudo
|
336
|
+
sudo_exec = target.options['sudo-executable'] || "sudo"
|
337
|
+
sudo_flags = [sudo_exec, "-S", "-H", "-u", run_as, "-p", sudo_prompt]
|
338
|
+
sudo_flags += ["-E"] if options[:environment]
|
339
|
+
Shellwords.shelljoin(sudo_flags)
|
340
|
+
else
|
341
|
+
Shellwords.shelljoin(@target.options['run-as-command'] + [run_as])
|
342
|
+
end
|
343
343
|
command_str = build_sudoable_command_str(command_str, sudo_str, @sudo_id, options)
|
344
344
|
end
|
345
345
|
|
@@ -111,7 +111,8 @@ module Bolt
|
|
111
111
|
end
|
112
112
|
|
113
113
|
def mkdirs(dirs)
|
114
|
-
|
114
|
+
paths = dirs.uniq.sort.join('","')
|
115
|
+
mkdir_command = "mkdir -Force -Path (\"#{paths}\")"
|
115
116
|
result = execute(mkdir_command)
|
116
117
|
if result.exit_code != 0
|
117
118
|
message = "Could not create directories: #{result.stderr.string}"
|
@@ -20,7 +20,7 @@ module Bolt
|
|
20
20
|
def upload(target, source, destination, _options = {})
|
21
21
|
with_connection(target) do |conn|
|
22
22
|
conn.with_remote_tmpdir do |dir|
|
23
|
-
basename = File.basename(
|
23
|
+
basename = File.basename(source)
|
24
24
|
tmpfile = "#{dir}/#{basename}"
|
25
25
|
if File.directory?(source)
|
26
26
|
conn.write_remote_directory(source, tmpfile)
|
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: 2.
|
4
|
+
version: 2.16.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-06-
|
11
|
+
date: 2020-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -460,9 +460,11 @@ files:
|
|
460
460
|
- lib/bolt/catalog/logging.rb
|
461
461
|
- lib/bolt/cli.rb
|
462
462
|
- lib/bolt/config.rb
|
463
|
+
- lib/bolt/config/options.rb
|
463
464
|
- lib/bolt/config/transport/base.rb
|
464
465
|
- lib/bolt/config/transport/docker.rb
|
465
466
|
- lib/bolt/config/transport/local.rb
|
467
|
+
- lib/bolt/config/transport/options.rb
|
466
468
|
- lib/bolt/config/transport/orch.rb
|
467
469
|
- lib/bolt/config/transport/remote.rb
|
468
470
|
- lib/bolt/config/transport/ssh.rb
|