From f6a9dcdd6f2581d495c5d7f1eaef0ad495620901 Mon Sep 17 00:00:00 2001 From: Andreas Olsson Date: Tue, 13 Jun 2017 18:32:46 +0200 Subject: [PATCH] Catch pip_args in FreeBSD's and SUSE's ansible_install While neither the FreeBSD provisioner nor the SUSE provisioner support installing Ansible using pip their ansible_install methods still get called with that fourth argument. The result being these errors when Vagrant tries to install Ansible. /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/plugins/provisioners/ansible/cap/guest/freebsd/ansible_install.rb:10:in `ansible_install': wrong number of arguments (4 for 3) (ArgumentError) /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/plugins/provisioners/ansible/cap/guest/suse/ansible_install.rb:9:in `ansible_install': wrong number of arguments (4 for 3) (ArgumentError) The Arch provider, it too without pip support, already catches the pip_args argument this way. --- .../provisioners/ansible/cap/guest/freebsd/ansible_install.rb | 2 +- plugins/provisioners/ansible/cap/guest/suse/ansible_install.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/provisioners/ansible/cap/guest/freebsd/ansible_install.rb b/plugins/provisioners/ansible/cap/guest/freebsd/ansible_install.rb index 3d01d4276..189a67e3a 100644 --- a/plugins/provisioners/ansible/cap/guest/freebsd/ansible_install.rb +++ b/plugins/provisioners/ansible/cap/guest/freebsd/ansible_install.rb @@ -7,7 +7,7 @@ module VagrantPlugins module FreeBSD module AnsibleInstall - def self.ansible_install(machine, install_mode, ansible_version) + def self.ansible_install(machine, install_mode, ansible_version, pip_args) if install_mode != :default raise Ansible::Errors::AnsiblePipInstallIsNotSupported else diff --git a/plugins/provisioners/ansible/cap/guest/suse/ansible_install.rb b/plugins/provisioners/ansible/cap/guest/suse/ansible_install.rb index 0aa66e00f..e2beb838f 100644 --- a/plugins/provisioners/ansible/cap/guest/suse/ansible_install.rb +++ b/plugins/provisioners/ansible/cap/guest/suse/ansible_install.rb @@ -6,7 +6,7 @@ module VagrantPlugins module SUSE module AnsibleInstall - def self.ansible_install(machine, install_mode, ansible_version) + def self.ansible_install(machine, install_mode, ansible_version, pip_args) if install_mode != :default raise Ansible::Errors::AnsiblePipInstallIsNotSupported else