Merge pull request #730 from sudharsh/txt_template_fix
provisioner/puppet: fix crash when HieraConfigPath or ManifestDir is specified in the config file.
This commit is contained in:
commit
4b19de6512
|
@ -75,8 +75,8 @@ func (p *Provisioner) Prepare(raws ...interface{}) error {
|
||||||
if p.config.ExecuteCommand == "" {
|
if p.config.ExecuteCommand == "" {
|
||||||
p.config.ExecuteCommand = "{{.FacterVars}} {{if .Sudo}} sudo -E {{end}}" +
|
p.config.ExecuteCommand = "{{.FacterVars}} {{if .Sudo}} sudo -E {{end}}" +
|
||||||
"puppet apply --verbose --modulepath='{{.ModulePath}}' " +
|
"puppet apply --verbose --modulepath='{{.ModulePath}}' " +
|
||||||
"{{if .HieraConfigPath ne \"\"}}--hiera_config='{{.HieraConfigPath}}' {{end}}" +
|
"{{if ne .HieraConfigPath \"\"}}--hiera_config='{{.HieraConfigPath}}' {{end}}" +
|
||||||
"{{if .ManifestDir ne \"\"}}--manifestdir='{{.ManifestDir}}' {{end}}" +
|
"{{if ne .ManifestDir \"\"}}--manifestdir='{{.ManifestDir}}' {{end}}" +
|
||||||
"--detailed-exitcodes " +
|
"--detailed-exitcodes " +
|
||||||
"{{.ManifestFile}}"
|
"{{.ManifestFile}}"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue