kairen / kubeadm-ansible

Build a Kubernetes cluster using kubeadm via Ansible.
Apache License 2.0
724 stars 379 forks source link

Use the master's default ipv4 address, not `ansible_host` #56

Closed sc68cal closed 5 years ago

sc68cal commented 5 years ago

Inventory files that have FQDNs for the hosts of a cluster instead of raw IPs would fail.

    fatal: [osctrl-bgcloudv3-1.ece.comcast.net]: FAILED! => {"changed": true, "cmd": "kubeadm init --service-cidr 10.96.0.0/12 --kubernetes-version v1.13.0 --pod-network-cidr 10.244.0.0/16 --token <token> --apiserver-advertise-address osctrl-bgcloudv3-1.ece.comcast.net  ", "delta": "0:00:00.025122", "end": "2019-03-06 15:35:58.549072", "msg": "non-zero return code", "rc": 1, "start": "2019-03-06 15:35:58.523950", "stderr": "couldn't use \"osctrl-bgcloudv3-1.ece.comcast.net\" as \"apiserver-advertise-address\", must be ipv4 or ipv6 address", "stderr_lines": ["couldn't use \"osctrl-bgcloudv3-1.ece.comcast.net\" as \"apiserver-advertise-address\", must be ipv4 or ipv6 address"], "stdout": "", "stdout_lines": []}
kairen commented 5 years ago

LGTM