ansible-collection-hardening icon indicating copy to clipboard operation
ansible-collection-hardening copied to clipboard

Test multiple supported Ansible versions

Open schurzi opened this issue 1 year ago • 2 comments

Description

Currently we use the most recent Ansible version to run our tests. But our collection supports also older Ansible releases. To make sure we stay compatible, we need to add tests for the older Ansible versions. Since we already have a lot of tests, we should keep this to a minimum.

Solution

We have no clear solution to this.

Alternatives

Running our Playbooks without executing them against a specific host should cover a lot of possible issues. So using ansible-lint or something similar pinned to a specific Ansible version in a matrix build could be a good way to do this.

Additional information

No response

schurzi avatar Dec 05 '23 10:12 schurzi

@schurzi As a hint, we currently address this internally with a combination of poetry, tox and https://github.com/enpaul/tox-poetry-installer.

/cc @nejch

dlouzan avatar Jan 05 '24 13:01 dlouzan

Since poetry is not used here, even plain tox could do this and install different versions based on the tox environment.

Recently, hatch has also become more popular for python projects and supports tox-like environments (https://hatch.pypa.io/latest/environment/#dependencies).

nejch avatar Jan 05 '24 15:01 nejch