Add resolv.conf customization

This commit is contained in:
Joshua Boniface 2023-09-01 15:42:27 -04:00
parent cf1d8114e2
commit b814ec60f6
3 changed files with 19 additions and 2 deletions

View File

@ -9,6 +9,13 @@ timezone_location: Canada/Eastern
# Cluster domain for node FQDNs # Cluster domain for node FQDNs
local_domain: upstream.local local_domain: upstream.local
# DNS recursive servers and search domains for nodes
recursive_dns_servers:
- 8.8.8.8
- 8.8.4.4
recursive_dns_search_domains:
- "{{ local_domain }}"
# Cluster hardware model, used in pvc_user_configuration and grub_configuration below # Cluster hardware model, used in pvc_user_configuration and grub_configuration below
cluster_hardware: default cluster_hardware: default

View File

@ -6,6 +6,12 @@ debian_pvc_repository: https://repo.parallelvirtualcluster.org/debian
debian_pvc_signing_key_path: https://repo.parallelvirtualcluster.org/debian/bonifacelabs_signing_key.pub debian_pvc_signing_key_path: https://repo.parallelvirtualcluster.org/debian/bonifacelabs_signing_key.pub
debian_pvc_signing_key_id: 83D07192314835D4 debian_pvc_signing_key_id: 83D07192314835D4
recursive_dns_servers:
- 8.8.8.8
- 8.8.4.4
recursive_dns_search_domains:
- "{{ local_domain }}"
grub_cmdline: "systemd.unified_cgroup_hierarchy=0 console=tty0 console=ttyS{{ grub.serial_console[cluster_hardware].console }},115200 plymouth.ignore-serial-consoles splash" grub_cmdline: "systemd.unified_cgroup_hierarchy=0 console=tty0 console=ttyS{{ grub.serial_console[cluster_hardware].console }},115200 plymouth.ignore-serial-consoles splash"
grub_serial: "serial --unit={{ grub.serial_console[cluster_hardware].console }} --speed=115200" grub_serial: "serial --unit={{ grub.serial_console[cluster_hardware].console }} --speed=115200"

View File

@ -2,6 +2,10 @@
# {{ ansible_managed }} # {{ ansible_managed }}
domain {{ local_domain }} domain {{ local_domain }}
{% if recursive_dns_search_domains is defined %}
search {{ recursive_dns_search_domains | join (' ') }}
{% endif %}
options timeout:1 attempts:3 rotate options timeout:1 attempts:3 rotate
nameserver 8.8.8.8 {% for server in recursive_dns_servers %}
nameserver 8.8.4.4 nameserver {{ server }}
{% endfor %}