Browse Source

Add possibility to skip adding load balancer name in the hosts file (#9331)

pull/9361/head
Eugene Artemenko 2 years ago
committed by GitHub
parent
commit
8b9cd3959a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions
  1. 2
      roles/kubernetes/preinstall/defaults/main.yml
  2. 1
      roles/kubernetes/preinstall/tasks/0090-etchosts.yml

2
roles/kubernetes/preinstall/defaults/main.yml

@ -36,6 +36,8 @@ resolveconf_cloud_init_conf: /etc/resolveconf_cloud_init.conf
# All inventory hostnames will be written into each /etc/hosts file. # All inventory hostnames will be written into each /etc/hosts file.
populate_inventory_to_hosts_file: true populate_inventory_to_hosts_file: true
# K8S Api FQDN will be written into /etc/hosts file.
populate_loadbalancer_apiserver_to_hosts_file: true
sysctl_file_path: "/etc/sysctl.d/99-sysctl.conf" sysctl_file_path: "/etc/sysctl.d/99-sysctl.conf"

1
roles/kubernetes/preinstall/tasks/0090-etchosts.yml

@ -35,6 +35,7 @@
backup: yes backup: yes
unsafe_writes: yes unsafe_writes: yes
when: when:
- populate_loadbalancer_apiserver_to_hosts_file
- loadbalancer_apiserver is defined - loadbalancer_apiserver is defined
- loadbalancer_apiserver.address is defined - loadbalancer_apiserver.address is defined

Loading…
Cancel
Save