FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'ansible_host'"}
See original GitHub issueDescribe the bug A clear and concise description of what the bug is.
Error when running final step of installation.
FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'ansible_host'"}
To Reproduce Steps to reproduce the behavior:
- Install on a fresh Raspian or Rocky linux system using these instructions: https://github.com/Kubeinit/kubeinit#directly-executing-the-deployment-playbook
- See this error output: full-error-output.txt
Expected behavior
A complete installation.
Screenshots If applicable, add screenshots to help explain your problem.
Infrastructure
- Hypervisors OS: Raspian or Rocky Linux
- Version: Raspbian GNU/Linux 11 (bullseye) & Rocky Linux release 8.5 (Green Obsidian)
Deployment command
Followed instructions.
Inventory file diff
Run the following command:
diff \
<(curl https://raw.githubusercontent.com/Kubeinit/kubeinit/main/kubeinit/hosts/k8s/inventory) \
<(curl https://raw.githubusercontent.com/Kubeinit/kubeinit/main/kubeinit/hosts/okd/inventory)
And paste the output:
$ diff \
<(curl https://raw.githubusercontent.com/Kubeinit/kubeinit/main/kubeinit/hosts/k8s/inventory) \
<(curl https://raw.githubusercontent.com/Kubeinit/kubeinit/main/kubeinit/hosts/okd/inventory)
% Total % Received % Xferd Average Speed Time Time Time Current
% Total % Received % Xferd Average Speed Time Time T i Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 e Curr--:--:-- --:--:-- --:--:-- 0ent
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- 100 14 100 14 0 0 59 0 --:--:-- --:--:-- --:--:-- 60
100 14 100 14 0 0 56 0 --:--:-- --:--:-- --:--:-- 56
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
'ansible.vars.hostvars.HostVarsVars object' has no attribute ...
I had the same problem when I used -l 'server1.example.com' but when i changed -l 'all' it worked. The template has for host...
Read more >'ansible.vars.hostvars.HostVarsVars object' has no attribute ...
This error happened when using raft as storage backend. TASK [ansible-community.ansible-vault : Vault main configuration] ...
Read more >'ansible.vars.hostvars.HostVarsVars object' has no attribute ...
Hi all,. Below is my playbook. ... When I run the playbook, I get the below error message. ... Could someone help if...
Read more >Create hosts files on remote host with j2 template : r/ansible
{"changed": false, "msg": "AnsibleUndefinedVariable: 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'ansible_default_ipv4'"} ...
Read more >Ceph ansible-playbook fails with 'ansible.vars.hostvars ...
msg : |- The task includes an option with an undefined variable. The error was: 'ansible.vars.hostvars.HostVarsVars object' has no attribute ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I didnt see this again @jeffabailey I built all the packages for aarch64 but there are some changes needed in the guest vm images to have it running in ARM. (Rocky should work ootb I dont think this will ever work on a raspberry)
Ok, if inventory is calculated dynamically, and you dont expect anyone to use it, then why do instructions say:
It is no wonder people are struggling with this, when the instructions are misleading.
Further, the contents of the inventory file give this as an example of setting the ansible extravars:
But ccamacho on Jun 27 suggested Jeff use:
That’s a completely different format for the var. So what is going on with that?
It would be helpful to clarify the syntax for this extra var - both, in the inventory file, and, in the main instructions!