foreman_remote_execution_core 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40dc9b4977c799a3f8ad7bccb38fc4b8cc32134b
|
4
|
+
data.tar.gz: 5ae9fe01a1989c2d2cfc9d68d4eae023e5cdc903
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b3c4731a69062ca30bbc023abe2aed22f2e9be5d7ab7e067fc8c14133cb57c16f5fe70c4bceaf10abafe9717755139e246f470e08e28ba69f67b6aeb711be50
|
7
|
+
data.tar.gz: da984876ee96f01b82d2b6f53091e8346a5a87863cb6235b35d5cb7f145bde1b99a9e99765cba67fe4cd922c655082daa8db02b81f028e4b2c26e4e766ba93e4
|
@@ -24,14 +24,14 @@ module ForemanRemoteExecutionCore
|
|
24
24
|
def start
|
25
25
|
remote_script = cp_script_to_remote
|
26
26
|
output_path = File.join(File.dirname(remote_script), 'output')
|
27
|
+
exit_code_path = File.join(File.dirname(remote_script), 'exit_code')
|
27
28
|
|
28
|
-
# pipe the output to tee while capturing the exit code
|
29
|
+
# pipe the output to tee while capturing the exit code in a file
|
29
30
|
script = <<-SCRIPT
|
30
|
-
|
31
|
-
|
32
|
-
exec 4>&-
|
33
|
-
exit $exit_code
|
31
|
+
(#{su_prefix}#{remote_script}; echo $?>#{exit_code_path}) | /usr/bin/tee #{output_path}
|
32
|
+
exit $(< #{exit_code_path})
|
34
33
|
SCRIPT
|
34
|
+
|
35
35
|
logger.debug("executing script:\n#{script.lines.map { |line| " | #{line}" }.join}")
|
36
36
|
run_async(script)
|
37
37
|
rescue => e
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_remote_execution_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Nečas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: foreman-tasks-core
|