Skip to content

Instantly share code, notes, and snippets.

@mcoam
mcoam / hostsfile.py
Created November 23, 2017 21:06 — forked from jtyr/hostsfile.py
Ansible dynamic inventory script that reads any Ansible hosts file and transforms it into the JSON data structure.
#!/usr/bin/python2
#####
#
# Description
# -----------
#
# This is an Ansible dynamic inventory script that reads any Ansible hosts file
# and transforms it into the JSON data structure.
#