refactor ♻️: Improve regex pattern matching for kerberos configuration
Updated regular expressions in the `kerberos.yml` file to correctly extract and format Kerberos configuration paths, ensuring consistency and accuracy in the Ansible playbook.
This commit is contained in:
@@ -5,8 +5,8 @@
|
|||||||
{{
|
{{
|
||||||
(
|
(
|
||||||
samba_provision_output.stdout
|
samba_provision_output.stdout
|
||||||
| regex_findall('(/[^\\s,"\']*/private/krb5\\.conf)')
|
| regex_findall('(/[^\\s,"'']*/private/krb5\\.conf)')
|
||||||
| map('regex_replace', "['\",]", '')
|
| map('regex_replace', "['',\" ,]", '')
|
||||||
| list
|
| list
|
||||||
| default([])
|
| default([])
|
||||||
)
|
)
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: "Kerberos configuration verified: {{ krb5_conf_path }}"
|
msg: "Kerberos configuration verified: {{ krb5_conf_path }}"
|
||||||
when: krb5_conf_stat.stat.exists | default(false)
|
when: krb5_conf_stat.stat.exists | default(false)
|
||||||
|
|
||||||
- name: Copy krb5.conf to /etc/krb5.conf
|
- name: Copy krb5.conf to /etc/krb5.conf
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: '{{ krb5_conf_path }}'
|
src: '{{ krb5_conf_path }}'
|
||||||
|
|||||||
Reference in New Issue
Block a user