diff --git a/roles/kubernetes/node/defaults/main.yml b/roles/kubernetes/node/defaults/main.yml index 2d7242cda4b4a3e923b6d2a445c34dcfb7a9c98b..90840dbffef0ffd69a6f0113acc479ea499623b6 100644 --- a/roles/kubernetes/node/defaults/main.yml +++ b/roles/kubernetes/node/defaults/main.yml @@ -78,7 +78,12 @@ kubelet_custom_flags: [] kube_hyperkube_image_repo: "" # If non-empty, will use this string as identification instead of the actual hostname -kube_override_hostname: "{{ ansible_hostname }}" +kube_override_hostname: >- + {% if cloud_provider is defined %} + false + {% else %} + {{ ansible_hostname }} + {% endif %} # cAdvisor port kube_cadvisor_port: 0