Answers: <p>According to this <a href="https://www.vagrantup.com/docs/provisioning/ansible.html" rel="nofollow noreferrer">documentation</a> it is possible to install ansible and run a ansible playbook by using the following snippet:</p>
  
  <blockquote>
  <pre><code>Vagrant.configure("2") do |config|
  
    #
    # Run Ansible from the Vagrant Host
    #
    config.vm.provision "ansible" do |ansible|
      ansible.playbook = "playbook.yml"
    end
  
  end
  </code></pre>
  </blockquote>
  
Answers: CC BY-SA 3.0
Answers: 2017-12-11T19:23:19.200Z
Answers: 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](https://github.com/neillturner/kitchen-ansible)), so it is possible to run the ansible-process from localhost and provision several vagrant boxes, without installing ansible on them.
Answers: achnichtsowichtig
Answers: CC BY-SA 3.0
Answers: 2017-12-10T11:49:53.630Z
Answers: 2017-12-10T11:49:53.630Z
Answers: 030
Body: <p>As pointed out <a href="https://devops.stackexchange.com/questions/98/how-to-test-provisioning-and-configuration-in-ansible-setup">here</a>, testkitchen is in principable usable with ansible if the right plugins are installed.</p>
  
  <p>Now I've done all the installing and am at the point, where I wonder, what I missunderstood:</p>
  
  <p>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:</p>
  
  <blockquote>
    <p>Setting up ansible (2.4.1.0-1ppa~xenial) ...</p>
  </blockquote>
  
  <p>How can I prevent the installing of ansible? How can I tell testkitchen to use localhost as the machine which provisions the vagrant vms?</p>
  
  <p>To be more clear, I am trying to find a configuration for testkitchen (<a href="https://github.com/neillturner/kitchen-ansible" rel="nofollow noreferrer">as seen e.g. here under "Example .kitchen.yml file"</a>) that can accomplish this.</p>
  
  <p>So far I got this configuration in my .kitchen.yml:</p>
  
  <pre><code>[...]
  provisioner:
      name: ansible_playbook
      hosts: localhost
      require_chef_for_busser: false
      require_ruby_for_busser: false
      playbook: server.yml
  [...]
  </code></pre>
  
  <p>This still installs ansible on the vagrant boxes, which I don't want.</p>
  
Comments: CC BY-SA 4.0
Comments: 2019-12-23T07:56:49.110Z
Comments: Could you indicate whether you solved the issue?
Comments: 030
Tags: <ansible><testing><vagrant>
Title: How to setup testkitchen with ansible-provisioning from localhost for different vagrant-vms?
UserDisplayName: achnichtsowichtig
ThreadText: # How to setup testkitchen with ansible-provisioning from localhost for different vagrant-vms?
  
  (Asked by: username_0 on 2017-11-18)
  
  As pointed out [here](https://devops.stackexchange.com/questions/98/how-to-test-provisioning-and-configuration-in-ansible-setup), 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 (2.4.1.0-1ppa~xenial) ...
  
  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"](https://github.com/neillturner/kitchen-ansible)) that can accomplish this.
  
  So far I got this configuration in my .kitchen.yml:
  
  ```
  [...]
  provisioner:
      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.
  
  **Tags:** ansible, testing, vagrant
  
  > **Comments:**
  > **username_1**: Could you indicate whether you solved the issue?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-12-10. Score: 1
  
  According to this [documentation](https://www.vagrantup.com/docs/provisioning/ansible.html) 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"
  >   end
  >
  > end
  >
  > ```
  
  > **Comments:**
  > **username_0**: 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](https://github.com/neillturner/kitchen-ansible)), so it is possible to run the ansible-process from localhost and provision several vagrant boxes, without installing ansible on them.  
  
  ---
  
  