style 💎: Improve regex pattern for krb5_conf_path variable

Updated the regex pattern to correctly extract the krb5.conf path from the Samba provision output. This change ensures that the variable returns a list of paths even if only one is present.
This commit is contained in:
2025-11-05 22:37:19 +01:00
parent bb99d469fe
commit 257d4b925d

View File

@@ -4,8 +4,8 @@
krb5_conf_path: >-
{{ (your_string_variable
| regex_search(r"(/\S*krb5\.conf)", "\\1")
| default([]) # ensures a list even if no match
| first # safely take the first match
| default([])
| first
) | default('', true) }}
when: samba_provision_output.stdout is defined