From 39f922d2fee47c752956661207280142935699c4 Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Wed, 4 May 2016 13:17:19 -0400 Subject: [PATCH] Fix up azure source identification logic We now need to deal with two azure inventory scripts. The logic here was incorrect after the PR importing the new module. This brings it back in line with the old logic for selecting the class azure inventory script. --- awx/main/management/commands/inventory_import.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/awx/main/management/commands/inventory_import.py b/awx/main/management/commands/inventory_import.py index 9f350246bb..502dc75842 100644 --- a/awx/main/management/commands/inventory_import.py +++ b/awx/main/management/commands/inventory_import.py @@ -468,9 +468,8 @@ def load_inventory_source(source, all_group=None, group_filter_re=None, ''' # Sanity check: We sanitize these module names for our API but Ansible proper doesn't follow # good naming conventions - if source == 'azure': - source = 'windows_azure' - + print "SOURCE IS {}".format(source) + source = source.replace('azure.py', 'windows_azure.py') logger.debug('Analyzing type of source: %s', source) original_all_group = all_group if not os.path.exists(source):