cloudspin-stack-rake 0.1.5 → 0.1.6
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.
- checksums.yaml +4 -4
- data/lib/cloudspin/stack/rake/inspec_task.rb +7 -1
- data/lib/cloudspin/stack/rake/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1dc736257f587c6845521741c762ca8135720da2e99bed59caf1bdac74089a89
|
|
4
|
+
data.tar.gz: c1d09b263a4867d29a96f0e6dfe2a502bc2be21cb2665f9b8eb3dc46ab351208
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e003c3b512392320dd61288a4972dc29d9daa943f424fde8b5e6152802df7cb41a39b072fef441785b254adb5bde82e25c37c3b26b01d3cc03989ab2cfae3ae2
|
|
7
|
+
data.tar.gz: 5187cdc650afe0b9c18379060f3a54eeeb9abc5456b238e1ad57adbe7a8b35fb60f52cd0ffe1eba3a82fc750b1d432d77907d04344b9182de8fed64f275cefff
|
|
@@ -17,7 +17,7 @@ module Cloudspin
|
|
|
17
17
|
inspec_parameters: {})
|
|
18
18
|
@stack_instance = stack_instance
|
|
19
19
|
@stack_instance_id = stack_instance.id
|
|
20
|
-
@inspec_target = inspec_target
|
|
20
|
+
@inspec_target = inspec_target || inspec_target_for_aws
|
|
21
21
|
@inspec_parameters = inspec_parameters
|
|
22
22
|
|
|
23
23
|
@work_folder = work_folder || @stack_instance.working_folder
|
|
@@ -29,6 +29,12 @@ module Cloudspin
|
|
|
29
29
|
end
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
+
def inspec_target_for_aws
|
|
33
|
+
aws_region = @stack_instance.parameter_values['region']
|
|
34
|
+
aws_profile = @stack_instance.resource_values['assume_role_profile']
|
|
35
|
+
"aws://#{aws_region}/#{aws_profile}"
|
|
36
|
+
end
|
|
37
|
+
|
|
32
38
|
def define
|
|
33
39
|
desc 'Run inspec tests'
|
|
34
40
|
task :inspec do |t, args|
|