Fix empty kube_override_hostname in apiserver_sans (#4916)

kubernetes/master role defines this value as an empty string
when using a cloud provider, not undefined. The check was updated
accordingly.

Change-Id: I58dc31ef4fd568a717a6753eb89ca687933018ae
pull/4918/head
Matthew Mosesohn 2019-06-25 08:00:37 -07:00 committed by Kubernetes Prow Robot
parent 73f45fbe94
commit 465dfd68bc
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@
sans_access_ip: "{{ groups['kube-master'] | map('extract', hostvars, 'access_ip') | list | select('defined') | list }}"
sans_ip: "{{ groups['kube-master'] | map('extract', hostvars, 'ip') | list | select('defined') | list }}"
sans_address: "{{ groups['kube-master'] | map('extract', hostvars, ['ansible_default_ipv4', 'address']) | list | select('defined') | list }}"
sans_override: "{{ [kube_override_hostname] if kube_override_hostname is defined else [] }}"
sans_override: "{{ [kube_override_hostname] if kube_override_hostname else [] }}"
tags: facts
- name: Create audit-policy directory