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

FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'ansible_host'"} #647

Closed
jeffabailey opened this issue May 6, 2022 · 6 comments
Labels

Comments

@jeffabailey
Copy link
Contributor

Describe 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:

  1. Install on a fresh Raspian or Rocky linux system using these instructions: https://github.com/Kubeinit/kubeinit#directly-executing-the-deployment-playbook
  2. 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.

@ccamacho
Copy link
Collaborator

Hi, would you mind running the de[ployment like this?

ansible-playbook     -v --user root     -e kubeinit_spec=k8s-libvirt-1-1-1   -e hypervisor_hosts_spec='[[ansible_host=nyctea],[ansible_host=tyto]]'      ./kubeinit/playbook.yml

I bet you are using the default inventory file, there might be a nit there.

@Gl1TcH-1n-Th3-M4tR1x
Copy link

Or you can have:

hypervisor_hosts:
  hosts:
    hypervisor-01:
      ansible_host: nyctea
    hypervisor-02:
      ansible_host: tyto

In your inventory.yml file

@jeffabailey
Copy link
Contributor Author

@ccamacho I updated to the latest code and ran the command.

I encountered a new error.

fatal: [hypervisor-01]: UNREACHABLE! => {"changed": false, "msg": "Data could not be sent to remote host \"nyctea\". Make sure this host can be reached over ssh: Warning: Identity file /root/.ssh/kubeinit_id_rsa not accessible: Permission denied.\nCan't open user config file /root/.ssh/k8scluster_config: Permission denied\r\n", "unreachable": true}

I wonder if it makes sense for me to clone this repo and set up a test like this one for Rocky Linux & Raspian?

https://github.com/Kubeinit/kubeinit/actions/workflows/distro_test.yml

What do you think?

@Gl1TcH-1n-Th3-M4tR1x Thanks for the input, but the inventory.yml already contains that configuration.

@ccamacho
Copy link
Collaborator

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)

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

No branches or pull requests

4 participants
@jeffabailey @ccamacho @Gl1TcH-1n-Th3-M4tR1x and others