From 21b10784f429a9800b505e0b6df2bf49761ba13e Mon Sep 17 00:00:00 2001 From: Spencer Smith Date: Thu, 20 Apr 2017 09:32:03 -0400 Subject: [PATCH 1/2] allow for correct aws default resolver --- roles/kubernetes/preinstall/tasks/set_resolv_facts.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/kubernetes/preinstall/tasks/set_resolv_facts.yml b/roles/kubernetes/preinstall/tasks/set_resolv_facts.yml index 1f2b82cc1..390d4e562 100644 --- a/roles/kubernetes/preinstall/tasks/set_resolv_facts.yml +++ b/roles/kubernetes/preinstall/tasks/set_resolv_facts.yml @@ -16,7 +16,7 @@ {{dns_domain}}.{{d}}./{{d}}.{{d}}./com.{{d}}./ {%- endfor %} default_resolver: >- - {%- if cloud_provider is defined and cloud_provider in [ 'gce', 'aws' ] -%}169.254.169.254{%- else -%}8.8.8.8{%- endif -%} + {%- if cloud_provider is defined and cloud_provider in == 'gce' -%}169.254.169.254{%- elif cloud_provider is defined and cloud_provider == 'aws' -%}169.254.169.253{%- else -%}8.8.8.8{%- endif -%} - name: check if kubelet is configured stat: From 04818b9d942a191eccd26c407126f00bb2b79ad2 Mon Sep 17 00:00:00 2001 From: Spencer Smith Date: Thu, 20 Apr 2017 09:53:01 -0400 Subject: [PATCH 2/2] fix stray 'in' and break into multiple lines for clarity --- roles/kubernetes/preinstall/tasks/set_resolv_facts.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/roles/kubernetes/preinstall/tasks/set_resolv_facts.yml b/roles/kubernetes/preinstall/tasks/set_resolv_facts.yml index 390d4e562..18728faa7 100644 --- a/roles/kubernetes/preinstall/tasks/set_resolv_facts.yml +++ b/roles/kubernetes/preinstall/tasks/set_resolv_facts.yml @@ -16,7 +16,13 @@ {{dns_domain}}.{{d}}./{{d}}.{{d}}./com.{{d}}./ {%- endfor %} default_resolver: >- - {%- if cloud_provider is defined and cloud_provider in == 'gce' -%}169.254.169.254{%- elif cloud_provider is defined and cloud_provider == 'aws' -%}169.254.169.253{%- else -%}8.8.8.8{%- endif -%} + {%- if cloud_provider is defined and cloud_provider == 'gce' -%} + 169.254.169.254 + {%- elif cloud_provider is defined and cloud_provider == 'aws' -%} + 169.254.169.253 + {%- else -%} + 8.8.8.8 + {%- endif -%} - name: check if kubelet is configured stat: