Skip to content

Vagrant: couldn't resolve module/action 'kubernetes.core.k8s' #44

@Priw8

Description

@Priw8

Hi! When starting example for chapter-01 using vagrant up, the following error is thrown for me:

    host01: Running ansible-playbook...
ERROR! couldn't resolve module/action 'kubernetes.core.k8s'. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in '/home/priw8/prog/book-of-kubernetes/setup/roles/todo/tasks/main.yaml': line 32, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


- name: deploy database using operator
  ^ here
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

This error is fixed by running:

ansible-galaxy collection install kubernetes.core

Which is not mentioned in the Vagrant section of setup/README.md. The setup README only mentions installing stuff using ansible-galaxy in the AWS section, which I skipped since I'm running things locally instead. I think this installation step could be mentioned for Vagrant users.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions