Compare commits

...

2 Commits

Author SHA1 Message Date
257d4b925d 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.
2025-11-05 22:37:19 +01:00
bb99d469fe style 💎: Improve regex pattern for finding krb5.conf path
Updated the regex pattern to correctly extract the krb5.conf path from the `your_string_variable` value, ensuring a more reliable and consistent configuration setup.
2025-11-05 22:36:19 +01:00

View File

@@ -3,9 +3,9 @@
ansible.builtin.set_fact:
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
| regex_search(r"(/\S*krb5\.conf)", "\\1")
| default([])
| first
) | default('', true) }}
when: samba_provision_output.stdout is defined