opsicle 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/opsicle +2 -0
- data/lib/opsicle/config.rb +12 -10
- data/lib/opsicle/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1401401bfd3261a21d4625e88dac8de425d355d8
|
4
|
+
data.tar.gz: 720b59ad378d4cf9c51d5d85183651e6f9270f4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c39c4868df2325522a184646ca39d12e88370cf438187be508e149ce684e9c7439582b05e3c80f5556038070d2fae28ce0f68f9151ca42bdd5638f71633c42c8
|
7
|
+
data.tar.gz: 7013c01a65830d296d6fe8cf506b7f2af39e3e6eab40100e0c222c6e987cce15ac2b5b10dc96deda62d0f724a6630684848d04c36f675ef8eb66c8e2770fcdf6
|
data/bin/opsicle
CHANGED
@@ -21,11 +21,13 @@ DOCUMENTATION
|
|
21
21
|
switch :verbose, :desc => 'Enable Verbose mode for more logging', :negatable => false
|
22
22
|
switch :debug, :desc => 'Enable Debug mode for detailed logs and backtraces', :negatable => false
|
23
23
|
switch :color, :desc => 'Use colored output', :default_value => true
|
24
|
+
switch :mfa, :desc => 'Use MFA for this command (some AWS operations will fail without it based on policy)', :negatable => false
|
24
25
|
|
25
26
|
pre do |global_options, command, options, args|
|
26
27
|
$verbose = global_options[:verbose]
|
27
28
|
$debug = global_options[:debug]
|
28
29
|
$color = global_options[:color]
|
30
|
+
$use_mfa = global_options[:mfa]
|
29
31
|
ENV['GLI_DEBUG'] = $debug.to_s
|
30
32
|
true
|
31
33
|
end
|
data/lib/opsicle/config.rb
CHANGED
@@ -67,16 +67,18 @@ module Opsicle
|
|
67
67
|
|
68
68
|
# this will be an array of 0 or 1 because iam.list_mfa_devices.mfa_devices will only return 0 or 1 device per user;
|
69
69
|
# if user doesn't have MFA enabled, then this loop won't even execute
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
70
|
+
if $use_mfa
|
71
|
+
iam.list_mfa_devices.mfa_devices.each do |mfadevice|
|
72
|
+
mfa_serial_number = mfadevice.serial_number
|
73
|
+
get_mfa_token
|
74
|
+
session_credentials_hash = get_session(mfa_serial_number,
|
75
|
+
credentials.credentials.access_key_id,
|
76
|
+
credentials.credentials.secret_access_key).credentials
|
77
|
+
|
78
|
+
credentials = Aws::Credentials.new(session_credentials_hash.access_key_id,
|
79
|
+
session_credentials_hash.secret_access_key,
|
80
|
+
session_credentials_hash.session_token)
|
81
|
+
end
|
80
82
|
end
|
81
83
|
|
82
84
|
return credentials
|
data/lib/opsicle/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opsicle
|
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
|
- Andy Fleener
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-08-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk
|
@@ -274,7 +274,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
274
274
|
version: '0'
|
275
275
|
requirements: []
|
276
276
|
rubyforge_project:
|
277
|
-
rubygems_version: 2.4.
|
277
|
+
rubygems_version: 2.4.8
|
278
278
|
signing_key:
|
279
279
|
specification_version: 4
|
280
280
|
summary: An opsworks specific abstraction on top of the aws sdk
|
@@ -303,3 +303,4 @@ test_files:
|
|
303
303
|
- spec/opsicle/s3_bucket_spec.rb
|
304
304
|
- spec/opsicle/user_profile_spec.rb
|
305
305
|
- spec/spec_helper.rb
|
306
|
+
has_rdoc:
|