diff --git a/plugins/provisioners/ansible/cap/guest/freebsd/ansible_install.rb b/plugins/provisioners/ansible/cap/guest/freebsd/ansible_install.rb
index 189a67e3a..46aaf51f5 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, pip_args)
+            def self.ansible_install(machine, install_mode, ansible_version, pip_args, pip_install_cmd = "")
               if install_mode != :default
                 raise Ansible::Errors::AnsiblePipInstallIsNotSupported
               else
diff --git a/plugins/provisioners/ansible/cap/guest/pip/pip.rb b/plugins/provisioners/ansible/cap/guest/pip/pip.rb
index f522b9016..a5b890724 100644
--- a/plugins/provisioners/ansible/cap/guest/pip/pip.rb
+++ b/plugins/provisioners/ansible/cap/guest/pip/pip.rb
@@ -16,8 +16,12 @@ module VagrantPlugins
             end
 
             args_array = [pip_args, upgrade_arg, "#{package}#{version_arg}"]
+            args_array.reject! { |a| a.nil? || a.empty? }
 
-            machine.communicate.sudo "pip install #{args_array.join(' ')}"
+            pip_install = "pip install"
+            pip_install += " #{args_array.join(' ')}" unless args_array.empty?
+
+            machine.communicate.sudo pip_install
           end
 
           def self.get_pip(machine, pip_install_cmd=DEFAULT_PIP_INSTALL_CMD)
diff --git a/plugins/provisioners/ansible/cap/guest/suse/ansible_install.rb b/plugins/provisioners/ansible/cap/guest/suse/ansible_install.rb
index e2beb838f..d9b35d97e 100644
--- a/plugins/provisioners/ansible/cap/guest/suse/ansible_install.rb
+++ b/plugins/provisioners/ansible/cap/guest/suse/ansible_install.rb
@@ -1,3 +1,4 @@
+require_relative "../../../errors"
 
 module VagrantPlugins
   module Ansible
@@ -6,7 +7,7 @@ module VagrantPlugins
         module SUSE
           module AnsibleInstall
 
-            def self.ansible_install(machine, install_mode, ansible_version, pip_args)
+            def self.ansible_install(machine, install_mode, ansible_version, pip_args, pip_install_cmd = "")
               if install_mode != :default
                 raise Ansible::Errors::AnsiblePipInstallIsNotSupported
               else
diff --git a/test/unit/plugins/provisioners/ansible/cap/guest/arch/ansible_install_test.rb b/test/unit/plugins/provisioners/ansible/cap/guest/arch/ansible_install_test.rb
new file mode 100644
index 000000000..3d1414f96
--- /dev/null
+++ b/test/unit/plugins/provisioners/ansible/cap/guest/arch/ansible_install_test.rb
@@ -0,0 +1,59 @@
+require_relative "../../../../../../base"
+require_relative "../shared/pip_ansible_install_examples"
+
+
+require Vagrant.source_root.join("plugins/provisioners/ansible/cap/guest/arch/ansible_install")
+
+
+describe VagrantPlugins::Ansible::Cap::Guest::Arch::AnsibleInstall do
+  include_context "unit"
+
+  subject { VagrantPlugins::Ansible::Cap::Guest::Arch::AnsibleInstall }
+
+  let(:iso_env) do
+    # We have to create a Vagrantfile so there is a root path
+    env = isolated_environment
+    env.vagrantfile("")
+    env.create_vagrant_env
+  end
+
+  let(:machine) { iso_env.machine(iso_env.machine_names[0], :dummy) }
+  let(:communicator) { double("comm") }
+
+  before do
+    allow(machine).to receive(:communicate).and_return(communicator)
+    allow(communicator).to receive(:execute).and_return(true)
+  end
+
+  describe "#pip_setup" do
+    it "install required Arch packages and call Cap::Guest::Pip::get_pip" do
+      pip_install_cmd = "foo"
+
+      expect(communicator).to receive(:sudo).once.ordered.
+        with("pacman -Syy --noconfirm")
+      expect(communicator).to receive(:sudo).once.ordered.
+        with("pacman -S --noconfirm base-devel curl git")
+      expect(VagrantPlugins::Ansible::Cap::Guest::Pip).to receive(:get_pip).once.ordered.
+        with(machine, pip_install_cmd)
+
+      subject.pip_setup(machine, pip_install_cmd)
+    end
+  end
+
+  describe "#ansible_install" do
+
+    it_behaves_like "Ansible setup via pip"
+
+    describe "when install_mode is :default (or unknown)" do
+      it "installs ansible with 'pacman' package manager" do
+        expect(communicator).to receive(:sudo).once.ordered.
+          with("pacman -Syy --noconfirm")
+        expect(communicator).to receive(:sudo).once.ordered.
+          with("pacman -S --noconfirm ansible")
+
+        subject.ansible_install(machine, :default, "", "", "")
+      end
+    end
+  end
+
+end
\ No newline at end of file
diff --git a/test/unit/plugins/provisioners/ansible/cap/guest/debian/ansible_install_test.rb b/test/unit/plugins/provisioners/ansible/cap/guest/debian/ansible_install_test.rb
new file mode 100644
index 000000000..09e2003de
--- /dev/null
+++ b/test/unit/plugins/provisioners/ansible/cap/guest/debian/ansible_install_test.rb
@@ -0,0 +1,50 @@
+require_relative "../../../../../../base"
+require_relative "../shared/pip_ansible_install_examples"
+
+
+require Vagrant.source_root.join("plugins/provisioners/ansible/cap/guest/debian/ansible_install")
+
+
+describe VagrantPlugins::Ansible::Cap::Guest::Debian::AnsibleInstall do
+  include_context "unit"
+
+  subject { VagrantPlugins::Ansible::Cap::Guest::Debian::AnsibleInstall }
+
+  let(:iso_env) do
+    # We have to create a Vagrantfile so there is a root path
+    env = isolated_environment
+    env.vagrantfile("")
+    env.create_vagrant_env
+  end
+
+  let(:machine) { iso_env.machine(iso_env.machine_names[0], :dummy) }
+  let(:communicator) { double("comm") }
+
+  before do
+    allow(machine).to receive(:communicate).and_return(communicator)
+    allow(communicator).to receive(:execute).and_return(true)
+  end
+
+  describe "#ansible_install" do
+
+    it_behaves_like "Ansible setup via pip on Debian-based systems"
+
+    describe "when install_mode is :default (or unknown)" do
+      it "installs ansible with apt package manager" do
+        install_backports_if_wheezy_release = <<INLINE_CRIPT
+CODENAME=`lsb_release -cs`
+if [ x$CODENAME == 'xwheezy' ]; then
+  echo 'deb http://http.debian.net/debian wheezy-backports main' > /etc/apt/sources.list.d/wheezy-backports.list
+fi
+INLINE_CRIPT
+
+        expect(communicator).to receive(:sudo).once.ordered.with(install_backports_if_wheezy_release)
+        expect(communicator).to receive(:sudo).once.ordered.with("apt-get update -y -qq")
+        expect(communicator).to receive(:sudo).once.ordered.with("apt-get install -y -qq ansible")
+
+        subject.ansible_install(machine, :default, "", "", "")
+      end
+    end
+  end
+
+end
\ No newline at end of file
diff --git a/test/unit/plugins/provisioners/ansible/cap/guest/freebsd/ansible_install_test.rb b/test/unit/plugins/provisioners/ansible/cap/guest/freebsd/ansible_install_test.rb
new file mode 100644
index 000000000..cfd18925f
--- /dev/null
+++ b/test/unit/plugins/provisioners/ansible/cap/guest/freebsd/ansible_install_test.rb
@@ -0,0 +1,41 @@
+require_relative "../../../../../../base"
+require_relative "../shared/pip_ansible_install_examples"
+
+
+require Vagrant.source_root.join("plugins/provisioners/ansible/cap/guest/freebsd/ansible_install")
+
+
+describe VagrantPlugins::Ansible::Cap::Guest::FreeBSD::AnsibleInstall do
+  include_context "unit"
+
+  subject { VagrantPlugins::Ansible::Cap::Guest::FreeBSD::AnsibleInstall }
+
+  let(:iso_env) do
+    # We have to create a Vagrantfile so there is a root path
+    env = isolated_environment
+    env.vagrantfile("")
+    env.create_vagrant_env
+  end
+
+  let(:machine) { iso_env.machine(iso_env.machine_names[0], :dummy) }
+  let(:communicator) { double("comm") }
+
+  before do
+    allow(machine).to receive(:communicate).and_return(communicator)
+    allow(communicator).to receive(:execute).and_return(true)
+  end
+
+  describe "#ansible_install" do
+
+    it_behaves_like "Ansible setup via pip is not implemented"
+
+    describe "when install_mode is :default (or unknown)" do
+      it "installs ansible with 'pkg' package manager" do
+        expect(communicator).to receive(:sudo).with("yes | pkg install ansible")
+
+        subject.ansible_install(machine, :default, "", "", "")
+      end
+    end
+  end
+
+end
\ No newline at end of file
diff --git a/test/unit/plugins/provisioners/ansible/cap/guest/shared/pip_ansible_install_examples.rb b/test/unit/plugins/provisioners/ansible/cap/guest/shared/pip_ansible_install_examples.rb
new file mode 100644
index 000000000..ba6e096c9
--- /dev/null
+++ b/test/unit/plugins/provisioners/ansible/cap/guest/shared/pip_ansible_install_examples.rb
@@ -0,0 +1,68 @@
+
+shared_examples_for "Ansible setup via pip" do
+
+  describe "when install_mode is :pip" do
+    it "installs pip and calls Cap::Guest::Pip::pip_install" do
+      expect(communicator).to receive(:sudo).at_least(1).times.ordered
+      expect(VagrantPlugins::Ansible::Cap::Guest::Pip).to receive(:pip_install).once.ordered.
+        with(machine, "ansible", anything, anything, true)
+
+      subject.ansible_install(machine, :pip, "", "", "")
+    end
+  end
+
+  describe "when install_mode is :pip_args_only" do
+    it "installs pip and calls Cap::Guest::Pip::pip_install with 'pip_args' parameter" do
+      pip_args = "-r /vagrant/requirements.txt"
+
+      expect(communicator).to receive(:sudo).at_least(1).times.ordered
+      expect(VagrantPlugins::Ansible::Cap::Guest::Pip).to receive(:pip_install).with(machine, "", "", pip_args, false).ordered
+
+      subject.ansible_install(machine, :pip_args_only, "", pip_args, "")
+    end
+  end
+
+end
+
+shared_examples_for "Ansible setup via pip on Debian-based systems" do
+
+  describe "installs required Debian packages and..." do
+    pip_install_cmd = "foo"
+
+    it "calls Cap::Guest::Pip::get_pip with 'pip' install_mode" do
+      expect(communicator).to receive(:sudo).once.ordered.
+        with("apt-get update -y -qq")
+      expect(communicator).to receive(:sudo).once.ordered.
+        with("apt-get install -y -qq build-essential curl git libssl-dev libffi-dev python-dev")
+      expect(communicator).to receive(:sudo).once.ordered.
+        with("pip install --upgrade ansible")
+
+      subject.ansible_install(machine, :pip, "", "", pip_install_cmd)
+    end
+
+    it "calls Cap::Guest::Pip::get_pip with 'pip_args_only' install_mode" do
+      expect(communicator).to receive(:sudo).once.ordered.
+        with("apt-get update -y -qq")
+      expect(communicator).to receive(:sudo).once.ordered.
+        with("apt-get install -y -qq build-essential curl git libssl-dev libffi-dev python-dev")
+      expect(communicator).to receive(:sudo).once.ordered.
+        with("pip install")
+
+      subject.ansible_install(machine, :pip_args_only, "", "", pip_install_cmd)
+    end
+
+  end
+
+  it_behaves_like "Ansible setup via pip"
+
+end
+
+shared_examples_for "Ansible setup via pip is not implemented" do
+
+  describe "when install_mode is different from :default" do
+    it "raises an AnsiblePipInstallIsNotSupported error" do
+      expect { subject.ansible_install(machine, :ansible_the_hardway, "", "", "") }.to raise_error(VagrantPlugins::Ansible::Errors::AnsiblePipInstallIsNotSupported)
+    end
+  end
+
+end
\ No newline at end of file
diff --git a/test/unit/plugins/provisioners/ansible/cap/guest/suse/ansible_install_test.rb b/test/unit/plugins/provisioners/ansible/cap/guest/suse/ansible_install_test.rb
new file mode 100644
index 000000000..e183139e0
--- /dev/null
+++ b/test/unit/plugins/provisioners/ansible/cap/guest/suse/ansible_install_test.rb
@@ -0,0 +1,41 @@
+require_relative "../../../../../../base"
+require_relative "../shared/pip_ansible_install_examples"
+
+
+require Vagrant.source_root.join("plugins/provisioners/ansible/cap/guest/suse/ansible_install")
+
+
+describe VagrantPlugins::Ansible::Cap::Guest::SUSE::AnsibleInstall do
+  include_context "unit"
+
+  subject { VagrantPlugins::Ansible::Cap::Guest::SUSE::AnsibleInstall }
+
+  let(:iso_env) do
+    # We have to create a Vagrantfile so there is a root path
+    env = isolated_environment
+    env.vagrantfile("")
+    env.create_vagrant_env
+  end
+
+  let(:machine) { iso_env.machine(iso_env.machine_names[0], :dummy) }
+  let(:communicator) { double("comm") }
+
+  before do
+    allow(machine).to receive(:communicate).and_return(communicator)
+    allow(communicator).to receive(:execute).and_return(true)
+  end
+
+  describe "#ansible_install" do
+
+    it_behaves_like "Ansible setup via pip is not implemented"
+
+    describe "when install_mode is :default (or unknown)" do
+      it "installs ansible with 'zypper' package manager" do
+        expect(communicator).to receive(:sudo).with("zypper --non-interactive --quiet install ansible")
+
+        subject.ansible_install(machine, :default, "", "", "")
+      end
+    end
+  end
+
+end
\ No newline at end of file
diff --git a/test/unit/plugins/provisioners/ansible/cap/guest/ubuntu/ansible_install_test.rb b/test/unit/plugins/provisioners/ansible/cap/guest/ubuntu/ansible_install_test.rb
new file mode 100644
index 000000000..cae9a4cf8
--- /dev/null
+++ b/test/unit/plugins/provisioners/ansible/cap/guest/ubuntu/ansible_install_test.rb
@@ -0,0 +1,76 @@
+require_relative "../../../../../../base"
+require_relative "../shared/pip_ansible_install_examples"
+
+
+require Vagrant.source_root.join("plugins/provisioners/ansible/cap/guest/ubuntu/ansible_install")
+
+
+describe VagrantPlugins::Ansible::Cap::Guest::Ubuntu::AnsibleInstall do
+  include_context "unit"
+
+  subject { VagrantPlugins::Ansible::Cap::Guest::Ubuntu::AnsibleInstall }
+
+  let(:iso_env) do
+    # We have to create a Vagrantfile so there is a root path
+    env = isolated_environment
+    env.vagrantfile("")
+    env.create_vagrant_env
+  end
+
+  let(:machine) { iso_env.machine(iso_env.machine_names[0], :dummy) }
+  let(:communicator) { double("comm") }
+
+  before do
+    allow(machine).to receive(:communicate).and_return(communicator)
+    allow(communicator).to receive(:execute).and_return(true)
+  end
+
+  describe "#ansible_install" do
+
+    it_behaves_like "Ansible setup via pip on Debian-based systems"
+
+    describe "when install_mode is :default (or unknown)" do
+      describe "#ansible_apt_install" do
+        describe "installs ansible from ansible/ansible PPA repository" do
+
+          check_if_add_apt_repository_is_present="test -x \"$(which add-apt-repository)\""
+
+          it "first installs 'software-properties-common' package if add-apt-repository is not already present" do
+            allow(communicator).to receive(:test).
+              with(check_if_add_apt_repository_is_present).and_return(false)
+
+            expect(communicator).to receive(:sudo).once.ordered.
+              with("""
+                  apt-get update -y -qq && \
+                  apt-get install -y -qq software-properties-common
+                """)
+            expect(communicator).to receive(:sudo).once.ordered.
+              with("""
+                add-apt-repository ppa:ansible/ansible -y && \
+                apt-get update -y -qq && \
+                apt-get install -y -qq ansible
+              """)
+
+            subject.ansible_install(machine, :default, "", "", "")
+          end
+
+          it "adds 'ppa:ansible/ansible' and install 'ansible' package" do
+            allow(communicator).to receive(:test).
+              with(check_if_add_apt_repository_is_present).and_return(true)
+
+            expect(communicator).to receive(:sudo).
+              with("""
+                add-apt-repository ppa:ansible/ansible -y && \
+                apt-get update -y -qq && \
+                apt-get install -y -qq ansible
+              """)
+
+            subject.ansible_install(machine, :default, "", "", "")
+          end
+
+        end
+      end
+    end
+  end
+
+end
\ No newline at end of file