Use same options for all tests and default to Ansible IP correctly.

This commit is contained in:
Jeff Geerling 2019-04-19 16:09:09 -05:00
parent 746e4c07bb
commit 7eea163f81
2 changed files with 2 additions and 7 deletions

View File

@ -5,7 +5,7 @@
vars: vars:
# Allow swap in test environments (hard to control in some Docker envs). # Allow swap in test environments (hard to control in some Docker envs).
kubernetes_kubelet_extra_args: "--fail-swap-on=false" kubernetes_kubelet_extra_args: "--fail-swap-on=false --cgroup-driver=cgroupfs"
docker_install_compose: false docker_install_compose: false
pre_tasks: pre_tasks:
@ -24,11 +24,6 @@
- name: Gather facts. - name: Gather facts.
action: setup action: setup
- name: Use cgroupfs cgroup driver instead of systemd (RedHat).
set_fact:
kubernetes_kubelet_extra_args: '"--fail-swap-on=false --cgroup-driver=cgroupfs"'
when: ansible_os_family == 'RedHat'
roles: roles:
- role: geerlingguy.docker - role: geerlingguy.docker
- role: geerlingguy.kubernetes - role: geerlingguy.kubernetes

View File

@ -3,7 +3,7 @@
command: > command: >
kubeadm init kubeadm init
--pod-network-cidr={{ kubernetes_pod_network_cidr }} --pod-network-cidr={{ kubernetes_pod_network_cidr }}
--apiserver-advertise-address={{ kubernetes_apiserver_advertise_address | default(ansible_default_ipv4.address) }} --apiserver-advertise-address={{ kubernetes_apiserver_advertise_address | default(ansible_default_ipv4.address, true) }}
--kubernetes-version {{ kubernetes_version_kubeadm }} --kubernetes-version {{ kubernetes_version_kubeadm }}
--ignore-preflight-errors={{ kubernetes_ignore_preflight_errors }} --ignore-preflight-errors={{ kubernetes_ignore_preflight_errors }}
{{ kubernetes_kubeadm_init_extra_opts }} {{ kubernetes_kubeadm_init_extra_opts }}