Implement Azure RM creds and inventory

* Vendor ansible's azure_rm inventory script
* Add new inventory type
* Add new credential type
* Expand host instance_id column from varchar 100 to 1024 to accept the
  long instance ids returned by Azure
* Make the inventory_import azure match rename more explicit.
This commit is contained in:
Matthew Jones
2016-04-21 13:51:30 -04:00
parent 5543448a43
commit 296f70ce17
12 changed files with 943 additions and 14 deletions

View File

@@ -466,10 +466,10 @@ def load_inventory_source(source, all_group=None, group_filter_re=None,
'''
Load inventory from given source directory or file.
'''
# Sanity check: We need the "azure" module to be titled "windows_azure.py",
# because it depends on the "azure" package from PyPI, and naming the
# module the same way makes the importer sad.
source = source.replace('azure', 'windows_azure')
# 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'
logger.debug('Analyzing type of source: %s', source)
original_all_group = all_group