1c5391dda7
* Move proxy_env to kubespray-defaults/defaults
There is no reasons to use set_facts here
Signed-off-by: Etienne Champetier <e.champetier@ateme.com>
* Ensure kubeadm doesn't use proxy
*_proxy variables might be present in the environment (/etc/environment, bash profile, ...)
When this is the case we end up with those proxy configuration in /etc/kubernetes/manifests/kube-*.yaml manifests
We cannot unset env variables, but kubeadm is nice enough to ignore empty vars
93d288e2a4/cmd/kubeadm/app/util/env.go (L27)
Signed-off-by: Etienne Champetier <e.champetier@ateme.com>
24 lines
568 B
YAML
24 lines
568 B
YAML
---
|
|
- name: Configure defaults
|
|
debug:
|
|
msg: "Check roles/kubespray-defaults/defaults/main.yml"
|
|
tags:
|
|
- always
|
|
|
|
# do not run gather facts when bootstrap-os in roles
|
|
- name: set fallback_ips
|
|
import_tasks: fallback_ips.yml
|
|
when:
|
|
- "'bootstrap-os' not in ansible_play_role_names"
|
|
- fallback_ips is not defined
|
|
tags:
|
|
- always
|
|
|
|
- name: set no_proxy
|
|
import_tasks: no_proxy.yml
|
|
when:
|
|
- "'bootstrap-os' not in ansible_play_role_names"
|
|
- http_proxy is defined or https_proxy is defined
|
|
- no_proxy is not defined
|
|
tags:
|
|
- always
|