-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to join nodes #63
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I get the following error when trying to join nodes to the master:
TASK [kubernetes-node : Join to Kubernetes cluster] ****************************
fatal: [kubernetes-node1.k8s.anfieldroad.int]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'ansible_default_ipv4'\n\nThe error appears to have been in '/home/praetorian/andy/ansible/roles/kubernetes-node/tasks/join.yml': line 7, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Join to Kubernetes cluster\n ^ here\n"}
cat inventories/infrastructure/group_vars/kubernetes-cluster.yml
file: kubernetes-cluster.yml
master_ip: "{{ hostvars[groups['kubernetes-master'][0]]['ansible_default_ipv4'].address | default(groups['kubernetes-master'][0]) }}"
Is something incorrect here? (apart from the fact my group name is different from your code, this is intentional).
The text was updated successfully, but these errors were encountered: