Merge pull request #1607 from AlanCoding/tower_verify_field

Sync tower verify_ssl parameter with tower-cli
This commit is contained in:
Matthew Jones
2018-03-26 12:12:45 -07:00
committed by GitHub
4 changed files with 40 additions and 1 deletions

View File

@@ -54,7 +54,14 @@ def parse_configuration():
host_name = os.environ.get("TOWER_HOST", None)
username = os.environ.get("TOWER_USERNAME", None)
password = os.environ.get("TOWER_PASSWORD", None)
ignore_ssl = os.environ.get("TOWER_IGNORE_SSL", "1").lower() in ("1", "yes", "true")
ignore_ssl = False
ssl_negative_var = os.environ.get("TOWER_IGNORE_SSL", None)
if ssl_negative_var:
ignore_ssl = ssl_negative_var.lower() in ("1", "yes", "true")
else:
ssl_positive_var = os.environ.get("TOWER_VERIFY_SSL", None)
if ssl_positive_var:
ignore_ssl = ssl_positive_var.lower() not in ('true', '1', 't', 'y', 'yes')
inventory = os.environ.get("TOWER_INVENTORY", None)
license_type = os.environ.get("TOWER_LICENSE_TYPE", "enterprise")