As pointed out here, testkitchen is in principable usable with ansible if the right plugins are installed.

Now I've done all the installing and am at the point, where I wonder, what I missunderstood:

As a driver I use vagrant and I thought it might be a good idea to use the vagrant-host as the machine which does the ansible-provisoning since the ssh-access is obviously cared for by vagrant and python is installed on my boxes per default. Now, when I look at my logs, I see:

Setting up ansible ( ...

How can I prevent the installing of ansible? How can I tell testkitchen to use localhost as the machine which provisions the vagrant vms?

To be more clear, I am trying to find a configuration for testkitchen (as seen e.g. here under "Example .kitchen.yml file") that can accomplish this.

So far I got this configuration in my .kitchen.yml:

    name: ansible_playbook
    hosts: localhost
    require_chef_for_busser: false
    require_ruby_for_busser: false
    playbook: server.yml

This still installs ansible on the vagrant boxes, which I don't want.

  • Could you indicate whether you solved the issue?
    – 030
    Dec 23, 2019 at 7:56

1 Answer 1


According to this documentation it is possible to install ansible and run a ansible playbook by using the following snippet:

Vagrant.configure("2") do |config|

  # Run Ansible from the Vagrant Host
  config.vm.provision "ansible" do |ansible|
    ansible.playbook = "playbook.yml"

  • Sorry, maybe my description was not good, since I am not very familiar with the necessary termology. What I try to achiv is some kind of configuration for testkitchen (like here), so it is possible to run the ansible-process from localhost and provision several vagrant boxes, without installing ansible on them. Dec 11, 2017 at 19:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.