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
This commit is contained in:
Gilles Cornu 2016-10-10 21:45:29 +02:00
parent b1ddc98e17
commit a55590b84f
No known key found for this signature in database
GPG Key ID: F6BC2CF7E1FE8FFF
1 changed files with 2 additions and 2 deletions

View File

@ -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
)