Allowed key entries with -

This commit is contained in:
Kevin Veen-Birkenbach 2025-07-13 21:20:52 +02:00
parent 33d14741e2
commit 77b3ca5fa2
No known key found for this signature in database
GPG Key ID: 44D8F11FD62F878E

View File

@ -12,7 +12,7 @@ class AppConfigKeyError(AnsibleFilterError, ValueError):
def get_app_conf(applications, application_id, config_path, strict=True):
def access(obj, key, path_trace):
m = re.match(r"^([a-zA-Z0-9_]+)(?:\[(\d+)\])?$", key)
m = re.match(r"^([a-zA-Z0-9_-]+)(?:\[(\d+)\])?$", key)
if not m:
raise AppConfigKeyError(
f"Invalid key format in config_path: '{key}'\n"