Skip to content

bug: Regression in 375 with modules not found #377

@marcelmamula

Description

@marcelmamula

@richm @tomjelinek Please take this with priority, because #375 made this role unusable.

Problem

All custom modules in ha_cluster are in /library and they are called with plain name. This is not working, because Ansible expects them to be collection wide modules or they need to have path properly setup.

This was not a problem before, because all these modules were conditioned. This one is not, so it showed this role wide problem in
#375.

Environment

Tested with same results on:

  • Python 3.11 and ansible-core 2.16
  • Python 3.13 and ansible-core 2.20

NOTE: This is not SLES specific problem, because role fails before it even gets to shell files.

Testing

  1. Clone latest repository

  2. Execute role:

     - name: Execute Ansible Role ha_cluster
      ansible.builtin.include_role:
        name: fedora.linux_system_roles.ha_cluster

NOTE: Tested also with using roles: with same result.

  1. Observe error because module does not exist.
[ERROR]: couldn't resolve module/action 'sr_fingerprint'. This often indicates a misspelling, missing collection, or incorrect module path.
Origin: /ansible_collections/fedora/linux_system_roles/roles/ha_cluster/tasks/set_vars.yml:8:3

6     difference(ansible_facts.keys() | list) | length > 0
7
8 - name: Record role begin fingerprint
    ^ column 3

Additional

We use role specific filters in SLL roles in "{{ role_path }}/plugins/filters" and those can be called with __sap_swpm_hostnames_var | community.sap_install.validate_sap_abap_platform_hostname .

I tried moving sr_fingerprint.py to "{{ role_path }}/plugins/modules" and call it with fedora.linux_system_roles.ha_cluster.sr_fingerprint: but it did not work.

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