From e49c12ae08084a2aa88dd75a1ffa1c02e33ed6a8 Mon Sep 17 00:00:00 2001 From: Stephan Helas Date: Thu, 19 Feb 2026 11:52:45 +0100 Subject: [PATCH] fix: Allow dash in pfsense alias names --- plugins/lookup/pfsense.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/lookup/pfsense.py b/plugins/lookup/pfsense.py index bf83f336..6eb695b0 100644 --- a/plugins/lookup/pfsense.py +++ b/plugins/lookup/pfsense.py @@ -1365,8 +1365,8 @@ def __init__(self, data): def check_alias_name(name): """ check an alias name """ # todo: check reserved keywords (any, self, ...) - if re.match('^[a-zA-Z0-9_]+$', name) is None: - raise AnsibleError(name + ': the name of the alias may only consist of the characters "a-z, A-Z, 0-9 and _"') + if re.match('^[a-zA-Z0-9_-]+$', name) is None: + raise AnsibleError(name + ': the name of the alias may only consist of the characters "a-z, A-Z, 0-9, - and _"') def parse_host_alias(self, obj, src_name, type_name, name, allow_any, dns_servers=None): """ Parse an host alias definition """