From 13362ef2095f491e7f37fccbda0cd866f7594df1 Mon Sep 17 00:00:00 2001 From: Julian Phillips Date: Sun, 14 Jul 2013 22:07:11 +0100 Subject: [PATCH] Don't expose overrides directly to provisioners The overrides are processed, so that the provisioner only sees the appropriate sub-settings, so the provisioner does not need the raw overrides. If we leave the top-level overrides object in the provisioner configuration, then it will be rejected as an unknown configuration key. --- packer/template.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packer/template.go b/packer/template.go index f7cfca03e..5f05962dc 100644 --- a/packer/template.go +++ b/packer/template.go @@ -221,6 +221,11 @@ func ParseTemplate(data []byte) (t *Template, err error) { continue } + // The provisioners not only don't need or want the override settings + // (as they are processed as part of the preparation below), but will + // actively reject them as invalid configuration. + delete(v, "override") + raw.rawConfig = v }