diff --git a/CHANGELOG.md b/CHANGELOG.md index f45593912..834829ed3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,8 @@ BUG FIXES: - guests/debian: Force bring up eth0. Fixes hangs on setting hostname. [GH-2026] - hosts/fedora: properly detect later CentOS versions. [GH-2008] + - provisioners/ansible: Execute ansible with a cwd equal to the + path where the Vagrantfile is. [GH-2051] - provisioners/ansible: No longer report failure on every run. [GH-2007] - provisioners/ansible: Properly handle extra vars with spaces. [GH-1984] - provisioners/chef: Formatter option works properly. [GH-2058] diff --git a/plugins/provisioners/ansible/provisioner.rb b/plugins/provisioners/ansible/provisioner.rb index 9dbb1b625..7beab0025 100644 --- a/plugins/provisioners/ansible/provisioner.rb +++ b/plugins/provisioners/ansible/provisioner.rb @@ -42,7 +42,8 @@ module VagrantPlugins # Write stdout and stderr data, since it's the regular Ansible output command << { :env => { "ANSIBLE_FORCE_COLOR" => "true" }, - :notify => [:stdout, :stderr] + :notify => [:stdout, :stderr], + :workdir => @machine.env.root_path.to_s } begin