diff --git a/.github/workflows/requirements-molecule.txt b/.github/workflows/requirements-molecule.txt new file mode 100644 index 0000000..2468265 --- /dev/null +++ b/.github/workflows/requirements-molecule.txt @@ -0,0 +1,46 @@ +ansible-lint==24.5.0 +attrs==23.2.0 +black==24.4.2 +bracex==2.4 +certifi==2024.2.2 +cffi==1.16.0 +charset-normalizer==3.3.2 +click==8.1.7 +click-help-colors==0.9.4 +cryptography==42.0.7 +distro==1.9.0 +docker==7.1.0 +enrich==1.2.7 +filelock==3.14.0 +idna==3.7 +importlib_metadata==7.1.0 +Jinja2==3.1.4 +jmespath==1.0.1 +jsonschema==4.22.0 +jsonschema-specifications==2023.12.1 +markdown-it-py==3.0.0 +MarkupSafe==2.1.5 +mdurl==0.1.2 +molecule==24.2.1 +molecule-plugins==23.5.3 +mypy-extensions==1.0.0 +packaging==24.0 +pathspec==0.12.1 +platformdirs==4.2.2 +pluggy==1.5.0 +pycparser==2.22 +Pygments==2.18.0 +PyYAML==6.0.1 +referencing==0.35.1 +requests==2.31.0 +resolvelib==1.0.1 +rich==13.7.1 +rpds-py==0.18.1 +ruamel.yaml==0.18.6 +ruamel.yaml.clib==0.2.8 +selinux==0.3.0 +subprocess-tee==0.4.1 +urllib3==2.2.1 +wcmatch==8.5.2 +yamllint==1.35.1 +zipp==3.18.2 diff --git a/.github/workflows/reusable-molecule.yml b/.github/workflows/reusable-molecule.yml index e090a75..442ce05 100644 --- a/.github/workflows/reusable-molecule.yml +++ b/.github/workflows/reusable-molecule.yml @@ -31,20 +31,22 @@ jobs: echo "MOLECULE_IS_PRESENT=PRESENT" >> "${GITHUB_ENV}" fi working-directory: "${{ github.repository }}/roles/${{ inputs.role-name }}" - - name: Setup molecule + - name: Install Python modules # version of reauests is fixed because the fix # https://github.com/docker/docker-py/pull/3257/files # has not been in releases yet # it can be removed after updating to the next release of docker-py (now 7.1.0) + # pip3 install --no-cache-dir yamllint ansible==${{ inputs.ansible-version }} ansible-lint==24.5.0 \ + # molecule==24.2.1 molecule-plugins[docker]==23.5.3 docker==7.1.0 requests==2.31.0 \ + # jmespath==1.0.1 run: | - pip3 install --no-cache-dir yamllint ansible==${{ inputs.ansible-version }} ansible-lint==24.5.0 \ - molecule==24.2.1 molecule-plugins[docker]==23.5.3 docker==7.1.0 requests==2.31.0 \ - jmespath==1.0.1 - - name: Run lint - run: | - python -m pip freeze + set -e + echo "ansible==${{ inputs.ansible-version }} >> requirements-molecule.txt + pip3 install --no-cache-dir -r requirements-molecule.txt + working-directory: "${{ github.repository }}/.github/workflows" - name: Print versions run: | + set -e ansible --version molecule --version yamllint --version