File tree Expand file tree Collapse file tree 7 files changed +19
-6
lines changed Expand file tree Collapse file tree 7 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -9,13 +9,15 @@ on: # yamllint disable-line rule:truthy
99 - ' molecule/os_hardening_vm/**'
1010 - ' .github/workflows/os_hardening_vm.yml'
1111 - ' requirements.txt'
12+ - ' requirements-vm.txt'
1213 pull_request :
1314 branches : [master]
1415 paths :
1516 - ' roles/os_hardening/**'
1617 - ' molecule/os_hardening_vm/**'
1718 - ' .github/workflows/os_hardening_vm.yml'
1819 - ' requirements.txt'
20+ - ' requirements-vm.txt'
1921 schedule :
2022 - cron : ' 0 6 * * 2'
2123
6365 source ~/.venv/ansible-collection-hardening/bin/activate
6466 python -m pip install --no-cache-dir --upgrade pip
6567 pip install -r requirements.txt
66- pip install python-vagrant
68+ pip install -r requirements-vm.txt
6769 working-directory : ansible_collections/devsec/hardening
6870
6971 - name : Downgrade Ansible for Rocky 8 tests
8486 - name : Test with molecule
8587 run : |
8688 source ~/.venv/ansible-collection-hardening/bin/activate
89+ # Workaround for https://github.com/ansible-community/molecule-plugins/issues/301
90+ export MOLECULE_VAGRANT_PLUGIN_DIR=$(python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])')/molecule_plugins/vagrant
8791 molecule test -s os_hardening_vm
8892 env :
8993 MOLECULE_DISTRO : ${{ matrix.molecule_distro }}
Original file line number Diff line number Diff line change @@ -9,13 +9,15 @@ on: # yamllint disable-line rule:truthy
99 - ' molecule/ssh_hardening_bsd/**'
1010 - ' .github/workflows/ssh_hardening_bsd.yml'
1111 - ' requirements.txt'
12+ - ' requirements-vm.txt'
1213 pull_request :
1314 branches : [master]
1415 paths :
1516 - ' roles/ssh_hardening/**'
1617 - ' molecule/ssh_hardening_bsd/**'
1718 - ' .github/workflows/ssh_hardening_bsd.yml'
1819 - ' requirements.txt'
20+ - ' requirements-vm.txt'
1921 schedule :
2022 - cron : ' 0 6 * * 5'
2123
5153 source ~/.venv/ansible-collection-hardening/bin/activate
5254 python -m pip install --no-cache-dir --upgrade pip
5355 pip install -r requirements.txt
54- pip install python-vagrant
56+ pip install -r requirements-vm.txt
5557 working-directory : ansible_collections/devsec/hardening
5658
5759 - name : Update Vagrant Box
6163 - name : Test with molecule
6264 run : |
6365 source ~/.venv/ansible-collection-hardening/bin/activate
66+ # Workaround for https://github.com/ansible-community/molecule-plugins/issues/301
67+ export MOLECULE_VAGRANT_PLUGIN_DIR=$(python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])')/molecule_plugins/vagrant
6468 molecule test -s ssh_hardening_bsd
6569 env :
6670 MOLECULE_DISTRO : ${{ matrix.molecule_distro }}
Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ provisioner:
2525 defaults :
2626 interpreter_python : auto_silent
2727 callbacks_enabled : profile_tasks, timer, yaml
28+ # Workaround for https://github.com/ansible-community/molecule-plugins/issues/301
29+ library : " ${MOLECULE_PROJECT_DIRECTORY}/plugins/modules:/usr/share/ansible:${MOLECULE_VAGRANT_PLUGIN_DIR}"
2830verifier :
2931 name : ansible
3032 env :
Original file line number Diff line number Diff line change 55 - name : Make sure environment variable for MOLECULE_DISTRO is set
66 ansible.builtin.assert :
77 that :
8- - " lookup('env','MOLECULE_DISTRO')"
8+ - " lookup('env','MOLECULE_DISTRO') | length > 0 "
99 fail_msg : " You need to set MOLECULE_DISTRO to a supported image name. See CONTRIBUTING.md"
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ provisioner:
2121 defaults :
2222 interpreter_python : auto_silent
2323 callbacks_enabled : profile_tasks, timer, yaml
24+ # Workaround for https://github.com/ansible-community/molecule-plugins/issues/301
25+ library : " ${MOLECULE_PROJECT_DIRECTORY}/plugins/modules:/usr/share/ansible:${MOLECULE_VAGRANT_PLUGIN_DIR}"
2426verifier :
2527 name : ansible
2628 env :
Original file line number Diff line number Diff line change 1+ molecule-plugins[vagrant]==25.8.12
Original file line number Diff line number Diff line change 1- molecule == 25.1 .0
2- molecule-plugins [docker ]== 23.7.0
3- ansible-core == 2.18.6
1+ molecule == 25.9 .0
2+ molecule-plugins [docker ]== 25.8.12
3+ ansible-core == 2.19.3
44docker == 7.1.0
55jmespath == 1.0.1
66aar-doc == 2.3.0
You can’t perform that action at this time.
0 commit comments