From 7acc0067f5ec5d81f9d25a2b61ac5e9a110f1593 Mon Sep 17 00:00:00 2001 From: Alan Rominger Date: Tue, 25 Apr 2023 13:37:13 -0400 Subject: [PATCH] Remove Ansible config override to validate group names (#13837) --- awx/main/models/inventory.py | 2 -- awx/main/tests/data/inventory/plugins/azure_rm/env.json | 3 +-- awx/main/tests/data/inventory/plugins/controller/env.json | 3 +-- awx/main/tests/data/inventory/plugins/ec2/env.json | 3 +-- awx/main/tests/data/inventory/plugins/gce/env.json | 1 - awx/main/tests/data/inventory/plugins/insights/env.json | 3 +-- awx/main/tests/data/inventory/plugins/openstack/env.json | 3 +-- awx/main/tests/data/inventory/plugins/rhv/env.json | 3 +-- awx/main/tests/data/inventory/plugins/satellite6/env.json | 3 +-- awx/main/tests/data/inventory/plugins/vmware/env.json | 3 +-- 10 files changed, 8 insertions(+), 19 deletions(-) diff --git a/awx/main/models/inventory.py b/awx/main/models/inventory.py index 21b3839461..7616c401a1 100644 --- a/awx/main/models/inventory.py +++ b/awx/main/models/inventory.py @@ -1479,8 +1479,6 @@ class PluginFileInjector(object): def build_env(self, inventory_update, env, private_data_dir, private_data_files): injector_env = self.get_plugin_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' # All CLOUD_PROVIDERS sources implement as inventory plugin from collection env['ANSIBLE_INVENTORY_ENABLED'] = 'auto' return env diff --git a/awx/main/tests/data/inventory/plugins/azure_rm/env.json b/awx/main/tests/data/inventory/plugins/azure_rm/env.json index 9ad6db311e..b2627d437d 100644 --- a/awx/main/tests/data/inventory/plugins/azure_rm/env.json +++ b/awx/main/tests/data/inventory/plugins/azure_rm/env.json @@ -1,9 +1,8 @@ { "ANSIBLE_JINJA2_NATIVE": "True", - "ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS": "never", "AZURE_CLIENT_ID": "fooo", "AZURE_CLOUD_ENVIRONMENT": "fooo", "AZURE_SECRET": "fooo", "AZURE_SUBSCRIPTION_ID": "fooo", "AZURE_TENANT": "fooo" -} \ No newline at end of file +} diff --git a/awx/main/tests/data/inventory/plugins/controller/env.json b/awx/main/tests/data/inventory/plugins/controller/env.json index cc7a5d1ffa..97f9605b72 100644 --- a/awx/main/tests/data/inventory/plugins/controller/env.json +++ b/awx/main/tests/data/inventory/plugins/controller/env.json @@ -1,5 +1,4 @@ { - "ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS": "never", "TOWER_HOST": "https://foo.invalid", "TOWER_PASSWORD": "fooo", "TOWER_USERNAME": "fooo", @@ -10,4 +9,4 @@ "CONTROLLER_USERNAME": "fooo", "CONTROLLER_OAUTH_TOKEN": "", "CONTROLLER_VERIFY_SSL": "False" -} \ No newline at end of file +} diff --git a/awx/main/tests/data/inventory/plugins/ec2/env.json b/awx/main/tests/data/inventory/plugins/ec2/env.json index 77cedd003e..2d1fea36ac 100644 --- a/awx/main/tests/data/inventory/plugins/ec2/env.json +++ b/awx/main/tests/data/inventory/plugins/ec2/env.json @@ -1,8 +1,7 @@ { "ANSIBLE_JINJA2_NATIVE": "True", - "ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS": "never", "AWS_ACCESS_KEY_ID": "fooo", "AWS_SECRET_ACCESS_KEY": "fooo", "AWS_SECURITY_TOKEN": "fooo", "AWS_SESSION_TOKEN": "fooo" -} \ No newline at end of file +} diff --git a/awx/main/tests/data/inventory/plugins/gce/env.json b/awx/main/tests/data/inventory/plugins/gce/env.json index 4c87c078eb..13970e2356 100644 --- a/awx/main/tests/data/inventory/plugins/gce/env.json +++ b/awx/main/tests/data/inventory/plugins/gce/env.json @@ -1,6 +1,5 @@ { "ANSIBLE_JINJA2_NATIVE": "True", - "ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS": "never", "GCE_CREDENTIALS_FILE_PATH": "{{ file_reference }}", "GOOGLE_APPLICATION_CREDENTIALS": "{{ file_reference }}", "GCP_AUTH_KIND": "serviceaccount", diff --git a/awx/main/tests/data/inventory/plugins/insights/env.json b/awx/main/tests/data/inventory/plugins/insights/env.json index 46eb0a34e7..b87328e761 100644 --- a/awx/main/tests/data/inventory/plugins/insights/env.json +++ b/awx/main/tests/data/inventory/plugins/insights/env.json @@ -1,5 +1,4 @@ { - "ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS": "never", "INSIGHTS_USER": "fooo", "INSIGHTS_PASSWORD": "fooo" -} \ No newline at end of file +} diff --git a/awx/main/tests/data/inventory/plugins/openstack/env.json b/awx/main/tests/data/inventory/plugins/openstack/env.json index 88dfb239c3..21e151c38b 100644 --- a/awx/main/tests/data/inventory/plugins/openstack/env.json +++ b/awx/main/tests/data/inventory/plugins/openstack/env.json @@ -1,4 +1,3 @@ { - "ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS": "never", "OS_CLIENT_CONFIG_FILE": "{{ file_reference }}" -} \ No newline at end of file +} diff --git a/awx/main/tests/data/inventory/plugins/rhv/env.json b/awx/main/tests/data/inventory/plugins/rhv/env.json index 08477df169..1030a591bf 100644 --- a/awx/main/tests/data/inventory/plugins/rhv/env.json +++ b/awx/main/tests/data/inventory/plugins/rhv/env.json @@ -1,7 +1,6 @@ { - "ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS": "never", "OVIRT_INI_PATH": "{{ file_reference }}", "OVIRT_PASSWORD": "fooo", "OVIRT_URL": "https://foo.invalid", "OVIRT_USERNAME": "fooo" -} \ No newline at end of file +} diff --git a/awx/main/tests/data/inventory/plugins/satellite6/env.json b/awx/main/tests/data/inventory/plugins/satellite6/env.json index 102abee70b..482d2ae505 100644 --- a/awx/main/tests/data/inventory/plugins/satellite6/env.json +++ b/awx/main/tests/data/inventory/plugins/satellite6/env.json @@ -1,6 +1,5 @@ { - "ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS": "never", "FOREMAN_PASSWORD": "fooo", "FOREMAN_SERVER": "https://foo.invalid", "FOREMAN_USER": "fooo" -} \ No newline at end of file +} diff --git a/awx/main/tests/data/inventory/plugins/vmware/env.json b/awx/main/tests/data/inventory/plugins/vmware/env.json index 97563377c0..6321c24f26 100644 --- a/awx/main/tests/data/inventory/plugins/vmware/env.json +++ b/awx/main/tests/data/inventory/plugins/vmware/env.json @@ -1,7 +1,6 @@ { - "ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS": "never", "VMWARE_HOST": "https://foo.invalid", "VMWARE_PASSWORD": "fooo", "VMWARE_USER": "fooo", "VMWARE_VALIDATE_CERTS": "False" -} \ No newline at end of file +}