forked from chef-boneyard/chef-provisioning-fog
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
insert a bootstrap helper for customization
so that drivers can add additional bootstrapping options
- Loading branch information
Thom May
committed
Jun 16, 2014
1 parent
ebc499b
commit ae0540d
Showing
3 changed files
with
13 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -429,11 +429,13 @@ def overwrite_default_key_willy_nilly(action_handler) | |
'metal_default' | ||
end | ||
|
||
def bootstrap_helper(action_handler, machine_spec, machine_options, bootstrap_options) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
thommay
Owner
|
||
bootstrap_options | ||
end | ||
|
||
def bootstrap_options_for(action_handler, machine_spec, machine_options) | ||
bootstrap_options = symbolize_keys(machine_options[:bootstrap_options] || {}) | ||
if provider == 'AWS' && !bootstrap_options[:key_name] | ||
bootstrap_options[:key_name] = overwrite_default_key_willy_nilly(action_handler) | ||
end | ||
bootstrap_options = bootstrap_helper(action_handler, machine_spec, machine_options, bootstrap_options) | ||
tags = { | ||
'Name' => machine_spec.name, | ||
'BootstrapId' => machine_spec.id, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hmm, I think you had it right before, especially since not all providers will implement tags. Maybe the sweet spot is to have some helper methods like protected default_tags?
Partly this is just me trying to deal with my personal issues around methods named "helper" :)