From a55590b84f53075d30081795087c32459f748166 Mon Sep 17 00:00:00 2001 From: Gilles Cornu Date: Mon, 10 Oct 2016 21:45:29 +0200 Subject: [PATCH] provisioners/ansible_local: Change binary detection - Remove `ansible-galaxy` detection, since this command was introduced in Ansible 1.4.2 (December 2013). Checking for `ansible-playbook` presence should therefore be enough for any "modern" Ansible setup. - Look for the command defined by the new `playbook_command` option. Related to GH-7881 and GH-7536 --- plugins/provisioners/ansible/provisioner/guest.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/provisioners/ansible/provisioner/guest.rb b/plugins/provisioners/ansible/provisioner/guest.rb index 66bc063c2..0d165db7e 100644 --- a/plugins/provisioners/ansible/provisioner/guest.rb +++ b/plugins/provisioners/ansible/provisioner/guest.rb @@ -52,9 +52,9 @@ module VagrantPlugins @machine.guest.capability(:ansible_install, config.install_mode, config.version) end - # Check that ansible binaries are well installed on the guest, + # Check that Ansible Playbook command is available on the guest @machine.communicate.execute( - 'test -x "$(command -v ansible-galaxy)" && test -x "$(command -v ansible-playbook)"', + "test -x \"$(command -v #{config.playbook_command})\"", error_class: Ansible::Errors::AnsibleNotFoundOnGuest, error_key: :ansible_not_found_on_guest )