Skip to content

fix module_utils import for galaxy collection#359

Open
BigSpaceships wants to merge 1 commit into
ceph:develfrom
BigSpaceships:devel
Open

fix module_utils import for galaxy collection#359
BigSpaceships wants to merge 1 commit into
ceph:develfrom
BigSpaceships:devel

Conversation

@BigSpaceships
Copy link
Copy Markdown

It's my understanding of https://docs.ansible.com/projects/ansible/latest/dev_guide/developing_module_utilities.html#naming-and-finding-module-utilities that this is how these should be imported, I can also make it so that it uses a try ... catch too in case there are older versions that like it how it is now

@ceph-jenkins
Copy link
Copy Markdown

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

3 similar comments
@ceph-jenkins
Copy link
Copy Markdown

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@ceph-jenkins
Copy link
Copy Markdown

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@ceph-jenkins
Copy link
Copy Markdown

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@Aletor93
Copy link
Copy Markdown

Aletor93 commented Apr 7, 2026

I was trying to install the collection as recommended here, but I can't find it on ansible-galaxy.

Then I ended with this:

collections:
  - source: https://github.com/ceph/cephadm-ansible.git
    type: git
    version: v5.0.2

But playbook tasks using ceph.cephadm collection are failing:

TASK [Bootstrap Ceph cluster] ***********************************************************************************************************************************************
[ERROR]: Task failed: Module failed: No module named 'module_utils'

Task failed: Module failed.
Origin: /.../playbook.yaml:6:7

4   name: Configure a Ceph cluster
5   tasks:
6     - name: Bootstrap Ceph cluster
        ^ column 7

<<< caused by >>>

No module named 'module_utils'

fatal: [...]: FAILED! => {"changed": false, "msg": "Task failed: Module failed: No module named 'module_utils'"}
fatal: [...]: FAILED! => {"changed": false, "msg": "Task failed: Module failed: No module named 'module_utils'"}
fatal: [...]: FAILED! => {"changed": false, "msg": "Task failed: Module failed: No module named 'module_utils'"}

Then, I gave a try to suggestion made here. It doesn't fail anymore.

@ceph-jenkins
Copy link
Copy Markdown

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@BigSpaceships
Copy link
Copy Markdown
Author

I would love feedback on this, if it's not something you're interested in implementing that's cool but it'd be great to know so I can plan

@Aletor93
Copy link
Copy Markdown

Hi,

As I wasn't able to install the collection as describe in the readme, I've switched to another collection named ceph.automation (which isn't idempotent :/).

Yet, I'm quite lost with the amount of collections/modules maintained below https://github.com/ceph. I could give a try later if this repo cephadm-ansible aims to replace ceph.automation.

Regards,

@asm0deuz
Copy link
Copy Markdown
Collaborator

@Aletor93 To summarize, there are three projects related to Ansible:

  • ceph-ansible, which is no longer actively maintained or supported since Ceph moved to the cephadm orchestrator.
  • cephadm-ansible, which provides playbooks for tasks that cephadm still cannot handle today (for example, preflight checks).
  • ceph.automation, an Ansible collection that combines the modules from the two previous projects. I didn’t want to lose all the work that had already been done in ceph-ansible. My original plan was eventually to remove the modules from both ceph-ansible and cephadm-ansible, and make them depend entirely on the modules provided by ceph.automation, so there would be a single place to maintain everything.

Unfortunately, due to lack of time, I was never able to complete that final step, and all three projects continued to evolve independently. I will try to find some free time to work on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants