Skip to content

Instantly share code, notes, and snippets.

@MalfuncEddie
MalfuncEddie / export-awx-inventory.py
Last active March 10, 2022 09:27 — forked from afreller-1wa/export-awx-inventory.py
Updated python script to export ansible inventory from awx | ansible tower server.
#!/usr/bin/python3
import requests
import argparse
import sys
# add terms to this list which will be ignored for ini file generation.
# eg. every host var that contains ther term remote_tower will be ignored
exclude_host_vars = [ 'remote_tower']
parser = argparse.ArgumentParser(description='Convert Ansible AWX/Tower Inventory to standard inventory')