ocp4-helpernode
ocp4-helpernode copied to clipboard
How to influence DNS hostnames when using the static IP config
We are moving from DHCP to static vars.yaml but we want to use our site's DNS and not the DNS on the helper
# cat ocp4-helpernode/vars.yaml
---
ansible_default_ipv4:
alias: "enp1s0"
broadcast: "10.192.131.255"
gateway: "10.192.128.1"
interface: "enp1s0"
macaddress: "52:54:00:95:09:92"
mtu: 1500
netmask: "255.255.240.0"
network: "10.192.131.0"
prefix: "24"
type: "ether"
disk: vda
ssh_gen_key: false
staticips: true
helper:
name: "helper"
ipaddr: "10.192.131.60"
dns:
domain: "foo.bar.com"
clusterid: "hjkzitv"
forwarder1: "10.193.0.250"
forwarder2: "10.192.0.250"
bootstrap:
name: "bootstrap"
ipaddr: "10.192.131.77"
masters:
- name: "master0"
ipaddr: "10.192.131.78"
- name: "master1"
ipaddr: "10.192.131.79"
- name: "master2"
ipaddr: "10.192.131.80"
workers:
- name: "worker0"
ipaddr: "10.192.131.81"
- name: "worker1"
ipaddr: "10.192.131.82"
When I resolve the nodes I get this
# cat /etc/resolv.conf
search hjkzitv.foo.bar.com
nameserver 127.0.0.1
# host master0
master0.hjkzitv.foo.bar.com has address 10.192.131.78
My nodes are already in our site's DNS as