-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Kubespray v2.24.0 facts gather missing #10933
Comments
This is fixed in master by f2bdd4b |
/close |
@VannTen: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Hello,
When running |
On which kubespray version ? What's the ouput exactly ?
(You might want to open a new issue)
|
What happened?
Tried to create cluster using kubespray docker image v2.24.0 and got following error at no_proxy task
fatal: [master1 -> localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'ansible_hostname'. 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'ansible_hostname'\n\nThe error appears to be in '/kubespray/roles/kubespray-defaults/tasks/no_proxy.yml': line 2, 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: Set no_proxy to all assigned cluster IPs and hostnames\n ^ here\n"}
What did you expect to happen?
I noticed no where we gathered facts before reaching
Set no_proxy to all assigned cluster IPs and hostnames
task on no_proxy.ymlI expected facts gathers before reaching this task
How can we reproduce it (as minimally and precisely as possible)?
You can just follow default setup procedure to reproduce the issue.
OS
Ubuntu 20.04
Version of Ansible
2.9.6
Version of Python
3.8.10
Version of Kubespray (commit)
v2.24.0
Network plugin used
calico
Full inventory with variables
docker exec -it kubespray ansible-playbook -i /inventory/inventory.ini --private-key /root/.ssh/id_rsa cluster.yml
Command used to invoke ansible
ansible-playbook -i /inventory/inventory.ini --private-key /root/.ssh/id_rsa cluster.yml
Output of ansible run
TASK [kubespray-defaults : Set no_proxy to all assigned cluster IPs and hostnames] ********************************************************************************************************************************************************** fatal: [master1 -> localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'ansible_hostname'. 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'ansible_hostname'\n\nThe error appears to be in '/kubespray/roles/kubespray-defaults/tasks/no_proxy.yml': line 2, 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: Set no_proxy to all assigned cluster IPs and hostnames\n ^ here\n"}
Anything else we need to know
I manually added gather_facts = true before reaching
Set no_proxy to all assigned cluster IPs and hostnames
taskAnd my issue for resolved
The text was updated successfully, but these errors were encountered: