From e8d1cc8e312d538dc5a44e0406c360a87b85578b Mon Sep 17 00:00:00 2001 From: Sudharshan S Date: Wed, 18 Dec 2013 19:33:43 +0530 Subject: [PATCH] Fix Puppet Provisioner crash when HieraConfigPath or ManifestDir is specified Prevents the following error, Build 'amazon-instance' errored: template: tpl11:1:103: executing "tpl11" at <.HieraConfigPath>: HieraConfigPath has arguments but cannot be invoked as function --- provisioner/puppet-masterless/provisioner.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/provisioner/puppet-masterless/provisioner.go b/provisioner/puppet-masterless/provisioner.go index 8ca6ba2dc..a290948fd 100644 --- a/provisioner/puppet-masterless/provisioner.go +++ b/provisioner/puppet-masterless/provisioner.go @@ -75,8 +75,8 @@ func (p *Provisioner) Prepare(raws ...interface{}) error { if p.config.ExecuteCommand == "" { p.config.ExecuteCommand = "{{.FacterVars}} {{if .Sudo}} sudo -E {{end}}" + "puppet apply --verbose --modulepath='{{.ModulePath}}' " + - "{{if .HieraConfigPath ne \"\"}}--hiera_config='{{.HieraConfigPath}}' {{end}}" + - "{{if .ManifestDir ne \"\"}}--manifestdir='{{.ManifestDir}}' {{end}}" + + "{{if ne .HieraConfigPath \"\"}}--hiera_config='{{.HieraConfigPath}}' {{end}}" + + "{{if ne .ManifestDir \"\"}}--manifestdir='{{.ManifestDir}}' {{end}}" + "--detailed-exitcodes " + "{{.ManifestFile}}" }