cloud-maker 0.4.0 → 0.4.1
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.
- data/bin/cloud-maker +1 -1
- data/lib/cloud_maker/config.rb +9 -6
- metadata +1 -1
data/bin/cloud-maker
CHANGED
data/lib/cloud_maker/config.rb
CHANGED
@@ -97,12 +97,12 @@ module CloudMaker
|
|
97
97
|
self.imports = extract_imports!(cloud_config)
|
98
98
|
self.cloud_config = cloud_config
|
99
99
|
|
100
|
-
self.import(self.class.new(EC2::CLOUD_MAKER_CONFIG)) if (extra_options['import_ec2'])
|
100
|
+
self.import(self.class.new(EC2::CLOUD_MAKER_CONFIG, 'config_path' => "EC2")) if (extra_options['import_ec2'])
|
101
101
|
|
102
102
|
# It's important here that reverse duplicates the imports array as executing the import will
|
103
103
|
# add the imported configs imports to the list and we do NOT want to reimport those as well.
|
104
104
|
self.imports.reverse.each do |import_path|
|
105
|
-
self.import(self.class.from_yaml(import_path, self.extra_options))
|
105
|
+
self.import(self.class.from_yaml(import_path, self.extra_options.merge('import_ec2' => false)))
|
106
106
|
end
|
107
107
|
self['tags'] ||= {}
|
108
108
|
self['tags']['cloud_maker_config'] = self.config_name
|
@@ -113,7 +113,10 @@ module CloudMaker
|
|
113
113
|
files.push self.extra_options['config_path'] if self.extra_options['config_path']
|
114
114
|
|
115
115
|
files.reverse.map { |import|
|
116
|
-
import
|
116
|
+
if import.rindex('/')
|
117
|
+
import = import[import.rindex('/')+1..-1]
|
118
|
+
end
|
119
|
+
import.gsub(/\..*/, '').gsub(/[^\w]/, '-')
|
117
120
|
}.join(':')
|
118
121
|
end
|
119
122
|
|
@@ -267,8 +270,8 @@ module CloudMaker
|
|
267
270
|
end
|
268
271
|
else
|
269
272
|
begin
|
270
|
-
|
271
|
-
cloud_yaml = File.open(
|
273
|
+
instance_config_yaml = File.expand_path(instance_config_yaml)
|
274
|
+
cloud_yaml = File.open(instance_config_yaml, "r") #Right_AWS will base64 encode this for us
|
272
275
|
rescue
|
273
276
|
raise FileContentNotFound.new("Unable to access the configuration via your local file system from #{full_path}.", instance_config_yaml)
|
274
277
|
end
|
@@ -278,7 +281,7 @@ module CloudMaker
|
|
278
281
|
# it like this makes sanity checking other missing values easy.
|
279
282
|
config = YAML::load(cloud_yaml) || {}
|
280
283
|
|
281
|
-
CloudMaker::Config.new(config, options.merge('config_path' =>
|
284
|
+
CloudMaker::Config.new(config, options.merge('config_path' => instance_config_yaml))
|
282
285
|
end
|
283
286
|
end
|
284
287
|
|