From bfdd2d07b3936c7eba5e46076057903f648dc5ba Mon Sep 17 00:00:00 2001 From: Jose Date: Wed, 5 Nov 2025 22:20:09 +0100 Subject: [PATCH] =?UTF-8?q?style=20=F0=9F=92=8E:=20Update=20regex=20patter?= =?UTF-8?q?n=20for=20extracting=20krb5.conf=20path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated the regular expression to correctly extract the krb5.conf path from the provision output, ensuring consistency in variable assignment. --- tasks/kerberos.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/kerberos.yml b/tasks/kerberos.yml index 57f6f90..2d6f3b2 100644 --- a/tasks/kerberos.yml +++ b/tasks/kerberos.yml @@ -2,10 +2,10 @@ - name: Extract absolute krb5.conf path from provision output ansible.builtin.set_fact: krb5_conf_path: >- - {{ (samba_provision_output.stdout - | regex_search('(/[^\\s]+/krb5\\.conf)', '\\1') + {{ (your_string_variable + | regex_search(r'(/\S*krb5\.conf)', '\\1') | default([]) # ensures a list even if no match - | first # safely takes the first match + | first # safely take the first match ) | default('', true) }} when: samba_provision_output.stdout is defined