This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
''' | |
Send an multipart email with HTML and plain text alternatives. The message | |
should be constructed as a plain-text file of the following format: | |
From: Your Name <your@email.com> | |
To: Recipient One <recipient@to.com> | |
Subject: Your subject line | |
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import json | |
import tempfile | |
import subprocess | |
import ansible_runner | |
def run(): | |
# create an Ansible playbook as a native Python dict object. Currently |