singeleaf
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
8 additions and
1 deletions
-
roles/kubernetes/preinstall/defaults/main.yml
-
roles/kubernetes/preinstall/tasks/0090-etchosts.yml
|
@ -60,3 +60,10 @@ pkg_install_retries: 4 |
|
|
|
|
|
|
|
|
# Check if access_ip responds to ping. Set false if your firewall blocks ICMP. |
|
|
# Check if access_ip responds to ping. Set false if your firewall blocks ICMP. |
|
|
ping_access_ip: true |
|
|
ping_access_ip: true |
|
|
|
|
|
|
|
|
|
|
|
apiserver_loadbalancer_domain_name_host: |- |
|
|
|
|
|
{% if inventory_hostname in groups['kube_control_plane'] -%} |
|
|
|
|
|
127.0.0.1 |
|
|
|
|
|
{%- else -%} |
|
|
|
|
|
{{ loadbalancer_apiserver.address }} |
|
|
|
|
|
{%- endif %} |
|
@ -29,7 +29,7 @@ |
|
|
lineinfile: |
|
|
lineinfile: |
|
|
dest: /etc/hosts |
|
|
dest: /etc/hosts |
|
|
regexp: ".*{{ apiserver_loadbalancer_domain_name }}$" |
|
|
regexp: ".*{{ apiserver_loadbalancer_domain_name }}$" |
|
|
line: "{{ loadbalancer_apiserver.address }} {{ apiserver_loadbalancer_domain_name }}" |
|
|
|
|
|
|
|
|
line: "{{ apiserver_loadbalancer_domain_name_host }} {{ apiserver_loadbalancer_domain_name }}" |
|
|
state: present |
|
|
state: present |
|
|
backup: yes |
|
|
backup: yes |
|
|
unsafe_writes: yes |
|
|
unsafe_writes: yes |
|
|