style 💎: Update regex pattern for krb5.conf path extraction

Updated the regular expression to extract the absolute path of the krb5.conf file from the provision output, ensuring consistency and accuracy in the extracted value.
This commit is contained in:
2025-11-05 21:15:00 +01:00
parent a48b146e81
commit fc0aeb908e

View File

@@ -1,9 +1,9 @@
---
- name: Extract krb5.conf path from provision output (robust)
- name: Extract any absolute krb5.conf path from provision output
ansible.builtin.set_fact:
krb5_conf_path: >-
{{ (samba_provision_output.stdout
| regex_search('generated at ([^\n]+/krb5\\.conf)', '\\1')
| regex_search('(/[^\\s]+/krb5\\.conf)', '\\1')
| first) | default('', true) }}
when: samba_provision_output.stdout is defined