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:
2025-10-19 22:25:19 +02:00
parent 0104e69124
commit 6c75e2910b
18 changed files with 549 additions and 239 deletions

View File

@@ -1,25 +1,30 @@
samba_ad_dc_state: present # or 'absent'
# AD Provisioning details
samba_realm: "EXAMPLE.COM"
samba_domain: "EXAMPLE"
samba_admin_password: "StrongAdminPassword123!"
samba_dns_backend: "SAMBA_INTERNAL"
samba_hostname: "{{ inventory_hostname }}"
# Hostname = DC1
addc_hostname: "DC1"
# DC local IP Address = 10.99.0.1
addc_ansible_host: "10.99.0.1"
# NetBIOS domain name (Workgroup).
addc_netbios_domain: "SAMDOM"
# Top level Domain = EXAMPLE.COM
addc_tld: "EXAMPLE.COM"
# Authentication Domain = SAMDOM.EXAMPLE.COM
addc_auth_domain: "{{ adc_netbios_domain | upper }}.{{ addc_tld | upper }}"
samba_log_dir: /var/log/samba
samba_provision_log_file: "{{ samba_log_dir }}/ad_provision.log"
# allows skipping verification when needed
samba_verify: true
addc_admin_password: "Passw0rd"
addc_dns_backend: "SAMBA_INTERNAL"
addc_server_role: "dc"
addc_ip_network_prefix: "{{ addc_ansible_host.split('.')[:3] | join('.') }}"
addc_ip_last_octet: "{{ addc_ansible_host.split('.')[-1] }}"
addc_reverse_zone_name: "{{ addc_ip_network_prefix.split('.') | reverse | join('.') }}.in-addr.arpa"
addc_tld: "{{ addc_auth_domain | lower }}"
# template for /etc/resolv.conf
samba_dns_nameservers:
- 127.0.0.1
- 8.8.8.8
samba_resolv_conf_backup_path: /etc/resolv.conf.ansible.bak
# Internal state tracking
samba_samdb_path: "/var/lib/samba/private/sam.ldb"
samba_conf_path: "/etc/samba/smb.conf"
location_internal_dns: 192.168.2.100
location_external_dns: 8.8.8.8
backup_path: "/path/to/your/backup/directory"