Browse Source

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 5 years ago
committed by Kubernetes Prow Robot
parent
commit
465dfd68bc
1 changed files with 1 additions and 1 deletions
  1. 2
      roles/kubernetes/master/tasks/kubeadm-setup.yml

2
roles/kubernetes/master/tasks/kubeadm-setup.yml

@ -71,7 +71,7 @@
sans_access_ip: "{{ groups['kube-master'] | map('extract', hostvars, 'access_ip') | list | select('defined') | list }}" 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_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_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 tags: facts
- name: Create audit-policy directory - name: Create audit-policy directory

Loading…
Cancel
Save