From 67719c162e5329e8c9b271176e61eee218db3a78 Mon Sep 17 00:00:00 2001 From: Matthew Mosesohn Date: Wed, 18 Jan 2017 19:18:47 +0300 Subject: [PATCH] Fix setting resolvconf when using rkt deploy mode rkt deploy mode doesn't create {{ bin_dir }}/kubelet, so let's rely on kubelet.env file instad. --- roles/kubernetes/preinstall/tasks/set_resolv_facts.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/kubernetes/preinstall/tasks/set_resolv_facts.yml b/roles/kubernetes/preinstall/tasks/set_resolv_facts.yml index 12ca7e96b..a2e97b819 100644 --- a/roles/kubernetes/preinstall/tasks/set_resolv_facts.yml +++ b/roles/kubernetes/preinstall/tasks/set_resolv_facts.yml @@ -17,16 +17,16 @@ default_resolver: >- {%- if cloud_provider is defined and cloud_provider == 'gce' -%}169.254.169.254{%- else -%}8.8.8.8{%- endif -%} -- name: check kubelet +- name: check if kubelet is configured stat: - path: "{{ bin_dir }}/kubelet" - register: kubelet + path: "{{ kube_config_dir }}/kubelet.env" + register: kubelet_configured changed_when: false - name: check if early DNS configuration stage set_fact: dns_early: >- - {%- if kubelet.stat.exists -%}false{%- else -%}true{%- endif -%} + {%- if kubelet_configured.stat.exists -%}false{%- else -%}true{%- endif -%} - name: target resolv.conf files set_fact: