Commit 8c1de9e7 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

provisioner/ansible-local: better error if missing [GH-836]

parent 4c09aac1
......@@ -32,6 +32,8 @@ BUG FIXES:
* post-processor/vagrant: AWS/DigitalOcean keep input artifacts by
default. [GH-55]
* provisioners/ansible-local: Properly upload custom playbooks. [GH-829]
* provisioners/ansible-local: Better error if ansible isn't installed.
[GH-836]
## 0.5.1 (01/02/2014)
......
......@@ -232,6 +232,12 @@ func (p *Provisioner) executeAnsible(ui packer.Ui, comm packer.Communicator) err
return err
}
if cmd.ExitStatus != 0 {
if cmd.ExitStatus == 127 {
return fmt.Errorf("%s could not be found. Verify that it is available on the\n" +
"PATH after connecting to the machine.",
p.config.Command)
}
return fmt.Errorf("Non-zero exit status: %d", cmd.ExitStatus)
}
return nil
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment