From 85be3c7692f7adaf25be48fc7f5af689cfbbca13 Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Thu, 26 Oct 2017 16:40:10 -0400 Subject: [PATCH] Align inventory variables with Ansible modules --- awx/main/models/credential.py | 2 +- awx/plugins/inventory/tower.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/awx/main/models/credential.py b/awx/main/models/credential.py index c24a0b7cec..6271cdc0de 100644 --- a/awx/main/models/credential.py +++ b/awx/main/models/credential.py @@ -1090,7 +1090,7 @@ def tower(cls): }, injectors={ 'env': { - 'TOWER_HOSTNAME': '{{host}}', + 'TOWER_HOST': '{{host}}', 'TOWER_USERNAME': '{{username}}', 'TOWER_PASSWORD': '{{password}}', } diff --git a/awx/plugins/inventory/tower.py b/awx/plugins/inventory/tower.py index 1de920728f..263cd5eebf 100755 --- a/awx/plugins/inventory/tower.py +++ b/awx/plugins/inventory/tower.py @@ -51,7 +51,7 @@ def parse_configuration(): help='Return all hosts known to Tower given a particular inventory', ) parser.parse_args() - host_name = os.environ.get("TOWER_HOSTNAME", None) + 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") @@ -60,7 +60,7 @@ def parse_configuration(): errors = [] if not host_name: - errors.append("Missing TOWER_HOSTNAME in environment") + errors.append("Missing TOWER_HOST in environment") if not username: errors.append("Missing TOWER_USERNAME in environment") if not password: