train-awsssm 0.2.1 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/train-awsssm/connection.rb +20 -0
- data/lib/train-awsssm/version.rb +1 -1
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 041cd55cc0d4c017c485f01e7a1e66bc1b1613878c3fa5ae5f63eb32a5ebde68
|
4
|
+
data.tar.gz: 95a505fbe146d80c867212658a7b50ca1de8662cadd2ab4428df63ed6c789d4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 235b021f311880bf479236543271ac364b5a53d8356b53b5300b9e4356790e3ea904e8d2740babc16621218b2e56ccdc2caa6c6ecd38da35a63c0e1124338e6f
|
7
|
+
data.tar.gz: f4a06389079443c938778cd5cdfc8af643962102533ec63916a8e2c567c9435a09bb51a5e128cf82694992daaea9124a024ae3ce1039b72992917dbacc5d55e2
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
## Unreleased
|
4
4
|
|
5
|
+
## Version 0.3.1
|
6
|
+
|
7
|
+
- Fix type problems when accepting URL-encoded parameters from Train
|
8
|
+
|
9
|
+
## Version 0.3.0
|
10
|
+
|
11
|
+
- Add support for `file_via_connection` (PR by @jkufro)
|
12
|
+
|
5
13
|
## Version 0.2.1
|
6
14
|
|
7
15
|
- Fix EC2 instance enumeration to use paging
|
@@ -30,6 +30,20 @@ module TrainPlugins
|
|
30
30
|
CommandResult.new(stdout, stderr, exit_status)
|
31
31
|
end
|
32
32
|
|
33
|
+
def file_via_connection(path, *args)
|
34
|
+
if os.aix?
|
35
|
+
Train::File::Remote::Aix.new(self, path, *args)
|
36
|
+
elsif os.solaris?
|
37
|
+
Train::File::Remote::Unix.new(self, path, *args)
|
38
|
+
elsif os[:name] == "qnx"
|
39
|
+
Train::File::Remote::Qnx.new(self, path, *args)
|
40
|
+
elsif os.windows?
|
41
|
+
Train::File::Remote::Windows.new(self, path, *args)
|
42
|
+
else
|
43
|
+
Train::File::Remote::Linux.new(self, path, *args)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
33
47
|
def execute_on_channel(cmd, &data_handler)
|
34
48
|
logger.debug format("[AWS-SSM] Command: '%s'", cmd)
|
35
49
|
|
@@ -75,6 +89,11 @@ module TrainPlugins
|
|
75
89
|
|
76
90
|
raise ArgumentError, format("Instance %s is not running", instance_id) unless instance_running?
|
77
91
|
raise ArgumentError, format("Instance %s is not managed by SSM or agent unreachable", instance_id) unless managed_instance?
|
92
|
+
|
93
|
+
options[:execution_timeout] = Integer(options[:execution_timeout])
|
94
|
+
options[:recheck_invocation] = Float(options[:recheck_invocation])
|
95
|
+
options[:recheck_execution] = Float(options[:recheck_execution])
|
96
|
+
options[:instance_pagesize] = Integer(options[:instance_pagesize])
|
78
97
|
end
|
79
98
|
|
80
99
|
# Resolve EC2 instance ID associated with a primary IP or a DNS entry
|
@@ -204,6 +223,7 @@ module TrainPlugins
|
|
204
223
|
def execute_command(address, command)
|
205
224
|
ssm_document = windows_instance? ? "AWS-RunPowerShellScript" : "AWS-RunShellScript"
|
206
225
|
|
226
|
+
logger.debug format("[AWS-SSM] Executing with timeout of %s seconds", options[:execution_timeout])
|
207
227
|
cmd = ssm.send_command(instance_ids: [instance_id], document_name: ssm_document, parameters: { "commands": [command] })
|
208
228
|
cmd_id = cmd.command.command_id
|
209
229
|
|
data/lib/train-awsssm/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: train-awsssm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Heinen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bump
|
@@ -16,56 +16,56 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.10'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0.
|
26
|
+
version: '0.10'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: chefstyle
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0
|
33
|
+
version: '2.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0
|
40
|
+
version: '2.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: guard
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '2.
|
47
|
+
version: '2.17'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '2.
|
54
|
+
version: '2.17'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: mdl
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0.
|
61
|
+
version: '0.11'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0.
|
68
|
+
version: '0.11'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
113
|
- !ruby/object:Gem::Version
|
114
114
|
version: '0'
|
115
115
|
requirements: []
|
116
|
-
rubygems_version: 3.
|
116
|
+
rubygems_version: 3.4.1
|
117
117
|
signing_key:
|
118
118
|
specification_version: 4
|
119
119
|
summary: Train Transport for AWS Systems Manager Agents
|