Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
add run_list and initial_attributes conditionally
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Monroy committed Jul 25, 2013
1 parent d6ee9e9 commit 9bb3638
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,9 +537,10 @@ def _prepare_launch_args(self):
chef['validation_name'] = settings.CHEF_VALIDATION_NAME
chef['validation_key'] = settings.CHEF_VALIDATION_KEY
chef['node_name'] = self.id
# use the layer's run list
chef['run_list'] = self.layer.run_list
chef['initial_attributes'] = self.layer.initial_attributes
if self.layer.run_list:
chef['run_list'] = self.layer.run_list
if self.layer.initial_attributes:
chef['initial_attributes'] = self.layer.initial_attributes
# add the formation's ssh pubkey
init.setdefault('ssh_authorized_keys', []).append(
self.formation.ssh_public_key)
Expand Down

0 comments on commit 9bb3638

Please sign in to comment.