From b20775288379b1ace89a3679ec757426bc026eaa Mon Sep 17 00:00:00 2001 From: Lars Lehtonen Date: Tue, 27 Aug 2019 16:52:52 -0700 Subject: [PATCH] provisioner/ansible: Fix dropped error --- provisioner/ansible/provisioner.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/provisioner/ansible/provisioner.go b/provisioner/ansible/provisioner.go index d61d4d44e..f129d8c79 100644 --- a/provisioner/ansible/provisioner.go +++ b/provisioner/ansible/provisioner.go @@ -240,6 +240,10 @@ func (p *Provisioner) Provision(ctx context.Context, ui packer.Ui, comm packer.C } hostSigner, err := newSigner(p.config.SSHHostKeyFile) + if err != nil { + return fmt.Errorf("error creating host signer: %s", err) + } + // Remove the private key file if len(k.privKeyFile) > 0 { defer os.Remove(k.privKeyFile)