Kubeinit / kubeinit

Ansible automation to have a KUBErnetes cluster INITialized as soon as possible...

Home Page:https://www.kubeinit.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

role 'kubeinit.kubeinit.kubeinit_prepare' was not found

njayakrishna opened this issue · comments

Hi,
On latest kubeInit checkout, I see the following issue soon after launching the script:

[jayakrin@nyctea kubeinit]$ ansible-playbook --user root -v -i ./hosts/okd/inventory --become --become-user root ./playbooks/okd.yml
[DEPRECATION WARNING]: Ansible will require Python 3.8 or newer on the controller starting with Ansible 2.12. Current version: 3.6.8 (default,
Sep 22 2021, 11:16:51) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)]. This feature will be removed from ansible-core in version 2.12. Deprecation
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
No config file found; using defaults

PLAY [Initial setup] *****************************************************************************************************************************

TASK [Gathering Facts] ***************************************************************************************************************************
ok: [localhost]

TASK [Check if Ansible meets version requirements.] **********************************************************************************************
ok: [localhost] => {
"changed": false,
"msg": "All assertions passed"
}

TASK [task-prepare-hypervisors] ******************************************************************************************************************
ERROR! the role 'kubeinit.kubeinit.kubeinit_prepare' was not found in /home/jayakrin/kubeinit/playbooks/roles:/home/jayakrin/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/home/jayakrin/kubeinit/playbooks

The error appears to be in '/home/jayakrin/kubeinit/playbooks/okd.yml': line 32, column 15, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

  ansible.builtin.include_role:
    name: kubeinit.kubeinit.kubeinit_prepare
          ^ here

PLAY RECAP ***************************************************************************************************************************************
localhost : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0

@njayakrishna hi!

We moved the roles calls to use the FQCN instead of the relative path to the files. This means you need to install the Kubeinit's collection if you use the code from the repository directly.

You can do it like this https://docs.kubeinit.com/usage.html#installing-dependencies to get the dependencies and then:

git clone https://github.com/kubeinit/kubeinit.git
cd kubeinit
rm -rf ~/.ansible/collections/ansible_collections/kubeinit/kubeinit
ansible-galaxy collection build -v --force --output-path releases/
ansible-galaxy collection install --force --force-with-deps releases/kubeinit-kubeinit-`cat galaxy.yml | shyaml get-value version`.tar.gz

Just let me know if this works for you.

Thanks, that fixed the issue. But further down, I am seeing this which I never saw before in my earlier version of kubeinit:
TASK [kubeinit.kubeinit.kubeinit_services : Add remote system connection definition for bastion hypervisor] **************************************
fatal: [localhost -> localhost]: FAILED! => {"changed": false, "cmd": ["podman", "--remote", "system", "connection", "add", "service-01", "--identity", "~/.ssh/okdcluster_id_rsa", "ssh://root@fe80::3e7c:3fff:fe4c:ca6e%enp3s0:22/run/user/0/podman/podman.sock"], "delta": "0:00:00.018617", "end": "2021-09-29 04:08:08.381757", "msg": "non-zero return code", "rc": 125, "start": "2021-09-29 04:08:08.363140", "stderr": "Error: parse "ssh://root@fe80::3e7c:3fff:fe4c:ca6e%enp3s0:22/run/user/0/podman/podman.sock": invalid URL escape "%en"", "stderr_lines": ["Error: parse "ssh://root@fe80::3e7c:3fff:fe4c:ca6e%enp3s0:22/run/user/0/podman/podman.sock": invalid URL escape "%en""], "stdout": "", "stdout_lines": []}

@njayakrishna can you make sure you have IPv6 disabled? root@fe80::3e7c:3fff:fe4c:ca6e%enp3s0:22 should be root@xxx.xxx.xxx.xxx:22