Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:mig4
ansible
0001-Avoid-forcing-settings-for-group-name-mang...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Avoid-forcing-settings-for-group-name-mangling.patch of Package ansible
From 3d54719d9ff37d339b9f8c309df4b29309469e15 Mon Sep 17 00:00:00 2001 From: mig4 <42650719@auril.club> Date: Wed, 29 Jul 2020 14:36:41 +0100 Subject: [PATCH] Avoid forcing settings for group name mangling Currently dynamic inventory plugins based on `TODO` always mangle group names by replacing certain characters. This is a side effect of using `TODO` which in turn uses `to_safe_group_name` which is overridden in `ansible.plugins.inventory` to always pass `force=True` parameter. This means neither the plugin nor the end-user has any say in this. This change removes the overridden `to_safe_group_name` from `ansible.plugins.inventory` causing it to use the original from `ansible.inventory.group` which allows managing the defaults in one place and honours user's preferences with regards to group name mangling. --- lib/ansible/plugins/inventory/__init__.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/ansible/plugins/inventory/__init__.py b/lib/ansible/plugins/inventory/__init__.py index fc6046c628..bdc36c68a0 100644 --- a/lib/ansible/plugins/inventory/__init__.py +++ b/lib/ansible/plugins/inventory/__init__.py @@ -24,7 +24,7 @@ import os import string from ansible.errors import AnsibleError, AnsibleParserError -from ansible.inventory.group import to_safe_group_name as original_safe +from ansible.inventory.group import to_safe_group_name from ansible.parsing.utils.addresses import parse_address from ansible.plugins import AnsiblePlugin from ansible.plugins.cache import CachePluginAdjudicator as CacheObject @@ -40,11 +40,6 @@ display = Display() # Helper methods -def to_safe_group_name(name): - # placeholder for backwards compat - return original_safe(name, force=True, silent=True) - - def detect_range(line=None): ''' A helper function that checks a given host line to see if it contains -- 2.27.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor