sap-linuxlab / community.sap_install

Automation for SAP - Collection of Ansible Roles for various SAP software installation
Apache License 2.0
54 stars 57 forks source link

collection: `ansible-lint` does not like `latest` in `requirements.yml` #883

Closed berndfinger closed 2 weeks ago

berndfinger commented 3 weeks ago

I tested using ansible-lint versions 24.9.0 and 24.9.2.

The version of requirements.yml producing this error contains:

  - name: community.general
    version: latest
    type: galaxy

The error message when running ansible-lint on the collection is:

ERROR! Unexpected Exception, this is probably a bug: Non integer values in LooseVersion ('latest')

The version of requirements.yml not producing this error contains:

  - name: community.general
    version: '>=9.5.0'
    type: galaxy

Note: The collection community.general version 9.5.0 is currently the latest one and has been published on Ansible Galaxy 23 days ago, see https://galaxy.ansible.com/ui/repo/published/community/general/.

marcelmamula commented 3 weeks ago

@berndfinger This looks like very strange issue with state data type.

kksat commented 2 weeks ago

Looks like there is a workaround

https://docs.ansible.com/ansible/5/user_guide/collections_using.html#installing-an-older-version-of-a-collection

Ansible will always install the most recent version that meets the range identifiers you specify. You can use the following range identifiers:

*: The most recent version. This is the default.

Solution would be either use '*' or no version at all.

  - name: community.general
    version: '*'
    type: galaxy
berndfinger commented 2 weeks ago

I think it's better to specify a minimum version.