Skip to content
This repository has been archived by the owner on Sep 7, 2019. It is now read-only.

KSid/windows-vagrant-ansible

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

windows-vagrant-ansible

Windows is not currently supported by Ansible which means the standard Ansible plugin provided with Vagrant cannot be used with this platform. The provision.sh script takes advantage of Vagrant's shell provisioning facilities to allow the use of Ansible from within a VM regardless of the host platform.

N.B. The script has only been tested on Debian Wheezy and will not work on an OS without the apt package manager.

Usage

Place provision.sh in the same directory as your Vagrantfile. You should then configure Vagrant to use shell provisioning where sh.path refers to provision.sh. Three options are required and must be supplied using sh.args in the following order:

  1. The directory the Ansible git repository should be cloned into
  2. The Ansible playbook to run
  3. The Ansible hosts inventory file to use

An example Vagrantfile is below:

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

  # ...

  config.vm.provision :shell do |sh|
    sh.path = "provision.sh"
    sh.args = "./ansible provisioning/setup.yml provisioning/hosts/dev_hosts"
  end
end

About

Use Ansible with Vagrant on a Windows host

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages