Skip to content
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

Open
andyanfieldroad opened this issue Jul 12, 2019 · 0 comments
Open

Unable to join nodes #63

andyanfieldroad opened this issue Jul 12, 2019 · 0 comments

Comments

@andyanfieldroad
Copy link

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant