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.
This commit is contained in:
Matthew Jones
2016-05-04 13:17:19 -04:00
parent 81dee0b494
commit 39f922d2fe

View File

@@ -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 # Sanity check: We sanitize these module names for our API but Ansible proper doesn't follow
# good naming conventions # good naming conventions
if source == 'azure': print "SOURCE IS {}".format(source)
source = 'windows_azure' source = source.replace('azure.py', 'windows_azure.py')
logger.debug('Analyzing type of source: %s', source) logger.debug('Analyzing type of source: %s', source)
original_all_group = all_group original_all_group = all_group
if not os.path.exists(source): if not os.path.exists(source):