Linting + formatting
This commit is contained in:
parent
bcd30ad2f2
commit
fbac46af91
|
@ -1,4 +1,4 @@
|
|||
// This package implements a provisioner for Packer that executes
|
||||
// Package puppetmasterless implements a provisioner for Packer that executes
|
||||
// Puppet on the remote machine, configured to apply a local manifest
|
||||
// versus connecting to a Puppet master.
|
||||
package puppetmasterless
|
||||
|
@ -380,24 +380,23 @@ func (p *Provisioner) uploadManifests(ui packer.Ui, comm packer.Communicator) (s
|
|||
return "", fmt.Errorf("Error uploading manifest dir: %s", err)
|
||||
}
|
||||
return remoteManifestDir, nil
|
||||
} else {
|
||||
// Otherwise manifest_file is a file and we'll upload it
|
||||
ui.Message(fmt.Sprintf(
|
||||
"Uploading manifest file from: %s", p.config.ManifestFile))
|
||||
|
||||
f, err := os.Open(p.config.ManifestFile)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
manifestFilename := filepath.Base(p.config.ManifestFile)
|
||||
remoteManifestFile := fmt.Sprintf("%s/%s", remoteManifestsPath, manifestFilename)
|
||||
if err := comm.Upload(remoteManifestFile, f, nil); err != nil {
|
||||
return "", err
|
||||
}
|
||||
return remoteManifestFile, nil
|
||||
}
|
||||
// Otherwise manifest_file is a file and we'll upload it
|
||||
ui.Message(fmt.Sprintf(
|
||||
"Uploading manifest file from: %s", p.config.ManifestFile))
|
||||
|
||||
f, err := os.Open(p.config.ManifestFile)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
manifestFilename := filepath.Base(p.config.ManifestFile)
|
||||
remoteManifestFile := fmt.Sprintf("%s/%s", remoteManifestsPath, manifestFilename)
|
||||
if err := comm.Upload(remoteManifestFile, f, nil); err != nil {
|
||||
return "", err
|
||||
}
|
||||
return remoteManifestFile, nil
|
||||
}
|
||||
|
||||
func (p *Provisioner) createDir(ui packer.Ui, comm packer.Communicator, dir string) error {
|
||||
|
|
Loading…
Reference in New Issue