mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 19:30:39 -03:30
Set Ansible name transform setting for built-in sources
This is the current default but will change in the future for these sources, we do not want behavior change
This commit is contained in:
parent
9479b1b824
commit
e84642b4a1
@ -1886,6 +1886,8 @@ class PluginFileInjector(object):
|
||||
else:
|
||||
injector_env = self.get_script_env(inventory_update, private_data_dir, private_data_files)
|
||||
env.update(injector_env)
|
||||
# Preserves current behavior for Ansible change in default planned for 2.10
|
||||
env['ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS'] = 'never'
|
||||
return env
|
||||
|
||||
def _get_shared_env(self, inventory_update, private_data_dir, private_data_files):
|
||||
|
||||
@ -1996,8 +1996,6 @@ class RunInventoryUpdate(BaseTask):
|
||||
else:
|
||||
env['ANSIBLE_INVENTORY_ENABLED'] = 'script'
|
||||
|
||||
# TODO: option for Automatic transformation of group names, ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS
|
||||
|
||||
if inventory_update.source in ['scm', 'custom']:
|
||||
for env_k in inventory_update.source_vars_dict:
|
||||
if str(env_k) not in env and str(env_k) not in settings.INV_ENV_VARIABLE_BLACKLIST:
|
||||
|
||||
@ -4,5 +4,6 @@
|
||||
"AZURE_TENANT": "fooo",
|
||||
"AZURE_SECRET": "fooo",
|
||||
"AZURE_CLOUD_ENVIRONMENT": "fooo",
|
||||
"ANSIBLE_JINJA2_NATIVE": "True"
|
||||
"ANSIBLE_JINJA2_NATIVE": "True",
|
||||
"ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS": "never"
|
||||
}
|
||||
@ -2,5 +2,6 @@
|
||||
"AWS_ACCESS_KEY_ID": "fooo",
|
||||
"AWS_SECRET_ACCESS_KEY": "fooo",
|
||||
"AWS_SECURITY_TOKEN": "fooo",
|
||||
"ANSIBLE_JINJA2_NATIVE": "True"
|
||||
"ANSIBLE_JINJA2_NATIVE": "True",
|
||||
"ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS": "never"
|
||||
}
|
||||
3
awx/main/tests/data/inventory/plugins/gce/env.json
Normal file
3
awx/main/tests/data/inventory/plugins/gce/env.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS": "never"
|
||||
}
|
||||
3
awx/main/tests/data/inventory/plugins/openstack/env.json
Normal file
3
awx/main/tests/data/inventory/plugins/openstack/env.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS": "never"
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
{
|
||||
"FOREMAN_SERVER": "https://foo.invalid",
|
||||
"FOREMAN_USER": "fooo",
|
||||
"FOREMAN_PASSWORD": "fooo"
|
||||
"FOREMAN_PASSWORD": "fooo",
|
||||
"ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS": "never"
|
||||
}
|
||||
@ -2,5 +2,6 @@
|
||||
"TOWER_HOST": "https://foo.invalid",
|
||||
"TOWER_USERNAME": "fooo",
|
||||
"TOWER_PASSWORD": "fooo",
|
||||
"TOWER_VERIFY_SSL": "False"
|
||||
"TOWER_VERIFY_SSL": "False",
|
||||
"ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS": "never"
|
||||
}
|
||||
@ -4,5 +4,6 @@
|
||||
"AZURE_TENANT": "fooo",
|
||||
"AZURE_SECRET": "fooo",
|
||||
"AZURE_CLOUD_ENVIRONMENT": "fooo",
|
||||
"AZURE_INI_PATH": "{{ file_reference }}"
|
||||
"AZURE_INI_PATH": "{{ file_reference }}",
|
||||
"ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS": "never"
|
||||
}
|
||||
@ -1,3 +1,4 @@
|
||||
{
|
||||
"CLOUDFORMS_INI_PATH": "{{ file_reference }}"
|
||||
"CLOUDFORMS_INI_PATH": "{{ file_reference }}",
|
||||
"ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS": "never"
|
||||
}
|
||||
@ -2,5 +2,6 @@
|
||||
"AWS_ACCESS_KEY_ID": "fooo",
|
||||
"AWS_SECRET_ACCESS_KEY": "fooo",
|
||||
"AWS_SECURITY_TOKEN": "fooo",
|
||||
"EC2_INI_PATH": "{{ file_reference }}"
|
||||
"EC2_INI_PATH": "{{ file_reference }}",
|
||||
"ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS": "never"
|
||||
}
|
||||
@ -3,5 +3,6 @@
|
||||
"GCE_PROJECT": "fooo",
|
||||
"GCE_CREDENTIALS_FILE_PATH": "{{ file_reference }}",
|
||||
"GCE_ZONE": "us-east4-a,us-west1-b",
|
||||
"GCE_INI_PATH": "{{ file_reference }}"
|
||||
"GCE_INI_PATH": "{{ file_reference }}",
|
||||
"ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS": "never"
|
||||
}
|
||||
@ -1,3 +1,4 @@
|
||||
{
|
||||
"OS_CLIENT_CONFIG_FILE": "{{ file_reference }}"
|
||||
"OS_CLIENT_CONFIG_FILE": "{{ file_reference }}",
|
||||
"ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS": "never"
|
||||
}
|
||||
@ -2,5 +2,6 @@
|
||||
"OVIRT_INI_PATH": "{{ file_reference }}",
|
||||
"OVIRT_URL": "https://foo.invalid",
|
||||
"OVIRT_USERNAME": "fooo",
|
||||
"OVIRT_PASSWORD": "fooo"
|
||||
"OVIRT_PASSWORD": "fooo",
|
||||
"ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS": "never"
|
||||
}
|
||||
@ -1,3 +1,4 @@
|
||||
{
|
||||
"FOREMAN_INI_PATH": "{{ file_reference }}"
|
||||
"FOREMAN_INI_PATH": "{{ file_reference }}",
|
||||
"ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS": "never"
|
||||
}
|
||||
@ -4,5 +4,6 @@
|
||||
"TOWER_PASSWORD": "fooo",
|
||||
"TOWER_VERIFY_SSL": "False",
|
||||
"TOWER_INVENTORY": "42",
|
||||
"TOWER_LICENSE_TYPE": "open"
|
||||
"TOWER_LICENSE_TYPE": "open",
|
||||
"ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS": "never"
|
||||
}
|
||||
@ -3,5 +3,6 @@
|
||||
"VMWARE_PASSWORD": "fooo",
|
||||
"VMWARE_HOST": "https://foo.invalid",
|
||||
"VMWARE_VALIDATE_CERTS": "False",
|
||||
"VMWARE_INI_PATH": "{{ file_reference }}"
|
||||
"VMWARE_INI_PATH": "{{ file_reference }}",
|
||||
"ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS": "never"
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user