From 73f16b2bee7af9e6a1f6e32f27661315dd37c7fe Mon Sep 17 00:00:00 2001 From: AlanCoding Date: Wed, 27 Mar 2019 09:27:10 -0400 Subject: [PATCH] Enable azure_rm inventory plugin --- awx/main/models/inventory.py | 5 +++-- .../tests/data/inventory/plugins/azure_rm/files/azure_rm.yml | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/awx/main/models/inventory.py b/awx/main/models/inventory.py index 9f466964e2..d4f4ed5771 100644 --- a/awx/main/models/inventory.py +++ b/awx/main/models/inventory.py @@ -1957,8 +1957,7 @@ class PluginFileInjector(object): class azure_rm(PluginFileInjector): plugin_name = 'azure_rm' - # FIXME: https://github.com/ansible/ansible/issues/54065 need resolving to enable - # initial_version = '2.8' # Driven by unsafe group names issue, hostvars + initial_version = '2.8' # Driven by unsafe group names issue, hostvars, host names ini_env_reference = 'AZURE_INI_PATH' base_injector = 'managed' @@ -2001,6 +2000,8 @@ class azure_rm(PluginFileInjector): # TODO: add proper support for group_by non-specific to compatibility # Dashes were not configurable in azure_rm.py script, we do not want unicode, so always use this ret['use_contrib_script_compatible_sanitization'] = True + # use same host names as script + ret['plain_host_names'] = True # By default the script did not filter hosts ret['default_host_filters'] = [] # User-given host filters diff --git a/awx/main/tests/data/inventory/plugins/azure_rm/files/azure_rm.yml b/awx/main/tests/data/inventory/plugins/azure_rm/files/azure_rm.yml index 4ddff1a988..af633f976c 100644 --- a/awx/main/tests/data/inventory/plugins/azure_rm/files/azure_rm.yml +++ b/awx/main/tests/data/inventory/plugins/azure_rm/files/azure_rm.yml @@ -31,5 +31,6 @@ keyed_groups: - key: dict(tags.keys() | map("regex_replace", "^(.*)$", "\1_") | list | zip(tags.values() | list)) if tags else [] prefix: '' separator: '' +plain_host_names: true plugin: azure_rm use_contrib_script_compatible_sanitization: true