Skip to content

Valid requirements.yml file with a git dependency that works via ansible-galaxy doesn't work via molecule #4461

@liamjones

Description

@liamjones

Prerequisites

  • This was not already reported in the past (duplicate check)
  • It does reproduce it with code from main branch (latest unreleased version)
  • I include a minimal example for reproducing the bug
  • The bug is not trivial, as for those a direct pull-request is preferred
  • Running pip check does not report any conflicts
  • I was able to reproduce the issue on a different machine
  • The issue is not specific to any driver other than 'default' one

Environment

molecule 25.6.0 using python 3.13
ansible:2.18.6
default:25.6.0 from molecule

and

molecule 25.4.0 using python 3.13
ansible:2.18.2
docker:2.1.0 from molecule_docker requiring collections: community.docker>=3.0.2 ansible.posix>=1.4.0
default:25.4.0 from molecule

What happened

I have a requirements.yml with the following contents:

collections:
  - name: community.general
    source: https://github.com/living-with/community.general
    type: git
    version: hotfix-issue-10305

ansible-galaxy install -r requirements.yml with this file works fine. However, if it's referenced in a molecule test via dependency.options.requirements-file it fails with:

ERROR! Unexpected Exception, this is probably a bug: Non integer values in LooseVersion ('hotfix-issue-10305')

Reproducing example

https://github.com/liamjones/molecule/tree/main/tests/fixtures/integration/test_command/molecule/test-scenario

(I just updated the basic test-scenario in the molecule repo to trigger the bug: liamjones@3a367fe)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions