patch undefined: Updated the DNS configuration in the resolv.conf.j2 template to include both the local host and the Ansible-managed DNS server.
Added a new line to the `resolv.conf.j2` template to specify the Ansible-managed DNS server (`{{ addc_ansible_host }}`). This ensures that the system uses both the local host and the managed DNS server for DNS resolution.
This commit is contained in:
@@ -1,8 +1,17 @@
|
||||
---
|
||||
- name: Configure Kerberos (krb5.conf)
|
||||
template:
|
||||
src: krb5.conf.j2
|
||||
- name: Extract krb5.conf path from provision output
|
||||
# The samba-tool output usually contains the path on a specific line.
|
||||
# We extract the path using regex and the 'search' filter.
|
||||
ansible.builtin.set_fact:
|
||||
krb5_conf_path: "{{ samba_provision_output.stdout | regex_search('krb5.conf file is located at (.*)', '\\1') | first }}"
|
||||
when: samba_provision_output.stdout is defined
|
||||
|
||||
- name: Copy krb5.conf to /etc/krb5.conf
|
||||
ansible.builtin.copy:
|
||||
src: "{{ krb5_conf_path }}"
|
||||
dest: /etc/krb5.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
# Only run this if the provision was successful (changed)
|
||||
when: samba_provision_output.changed
|
||||
Reference in New Issue
Block a user