Merge pull request #470 from kirikaza/fix_chef_config

provisioner/chef-solo: fix .RolesPath and .DataBagsPath in the config template
This commit is contained in:
Mitchell Hashimoto 2013-09-28 00:38:10 -07:00
commit 813ea684a2
1 changed files with 2 additions and 2 deletions

View File

@ -212,7 +212,7 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
rolesPath := "" rolesPath := ""
if p.config.RolesPath != "" { if p.config.RolesPath != "" {
rolesPath := fmt.Sprintf("%s/roles", p.config.StagingDir) rolesPath = fmt.Sprintf("%s/roles", p.config.StagingDir)
if err := p.uploadDirectory(ui, comm, rolesPath, p.config.RolesPath); err != nil { if err := p.uploadDirectory(ui, comm, rolesPath, p.config.RolesPath); err != nil {
return fmt.Errorf("Error uploading roles: %s", err) return fmt.Errorf("Error uploading roles: %s", err)
} }
@ -220,7 +220,7 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
dataBagsPath := "" dataBagsPath := ""
if p.config.DataBagsPath != "" { if p.config.DataBagsPath != "" {
dataBagsPath := fmt.Sprintf("%s/data_bags", p.config.StagingDir) dataBagsPath = fmt.Sprintf("%s/data_bags", p.config.StagingDir)
if err := p.uploadDirectory(ui, comm, dataBagsPath, p.config.DataBagsPath); err != nil { if err := p.uploadDirectory(ui, comm, dataBagsPath, p.config.DataBagsPath); err != nil {
return fmt.Errorf("Error uploading data bags: %s", err) return fmt.Errorf("Error uploading data bags: %s", err)
} }