Skip to content

Instantly share code, notes, and snippets.

@William-Yeh
William-Yeh / vagrant.py
Created October 24, 2015 13:17 — forked from majidaldo/vagrant.py
returns vagrant hosts for ansible inventory
#!/usr/bin/env python
# Adapted from Mark Mandel's implementation
# https://github.com/ansible/ansible/blob/devel/plugins/inventory/vagrant.py
import argparse
import json
import paramiko
import subprocess
import sys