Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Simple helper to use ansible with vagrant

Project Description

Tired of the rather limited vagrant provision with the ansible provider? Tired of keeping your hosts file up to date? ansible-vagrant to the rescue!


$ pip install ansible-vagrant
$ cd /path/to/project/with/a/vagrantfile

$ ansible-vagrant-update-hosts
$ cat hosts_vagrant
vagrant  ansible_ssh_host=  ansible_ssh_port=2222  ansible_ssh_use...

$ ansible-vagrant all -m ping
# Same as: ansible-vagrant-update-hosts \
#          && ansible all --inventory=./hosts_vagrant -m ping

$ ansible-playbook-vagrant playbook.yml
# Same as: ansible-vagrant-update-hosts \
#          && ansible-playbook --extra-vars="vagrant_host=true" \
#                              --inventory=./hosts_vagrant playbook.yml


  • All *-vagrant commands use ANSIBLE_HOST_KEY_CHECKING=False to prevent errors with vagrant destroy && vagrant up
  • It’s a good idea to put hosts_vagrant under .gitignore
  • ansible-playbook-vagrant adds a global variable named vagrant
  • Use when: vagrant_host is (not) defined to run stuff based on the current environment


  • ansiblev for ansible-vagrant
  • ansible-playbookv for ansible-playbook-vagrant
Release History

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
ansible-vagrant-1.3.0.tar.gz (2.0 kB) Copy SHA256 Checksum SHA256 Source Feb 6, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting