File provisioner, don't fail when no content is passed. (#11349)

This commit is contained in:
Adrien Delorme 2021-10-28 21:50:32 +02:00 committed by GitHub
parent 64ddaa922a
commit 948ef1f673
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -110,11 +110,6 @@ func (p *Provisioner) Prepare(raws ...interface{}) error {
}
}
if len(p.config.Sources) < 1 && p.config.Content == "" {
errs = packersdk.MultiErrorAppend(errs,
errors.New("source, sources or content must be specified."))
}
if len(p.config.Sources) > 0 && p.config.Content != "" {
errs = packersdk.MultiErrorAppend(errs,
errors.New("source(s) conflicts with content."))