Skip to content

Commit 5f78c0f

Browse files
committed
Add Workaround for vagrant
Signed-off-by: Martin Schurz <[email protected]>
1 parent d383670 commit 5f78c0f

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

.github/workflows/os_hardening_vm.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ jobs:
8686
- name: Test with molecule
8787
run: |
8888
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
8991
molecule test -s os_hardening_vm
9092
env:
9193
MOLECULE_DISTRO: ${{ matrix.molecule_distro }}

.github/workflows/ssh_hardening_bsd.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ jobs:
6363
- name: Test with molecule
6464
run: |
6565
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
6668
molecule test -s ssh_hardening_bsd
6769
env:
6870
MOLECULE_DISTRO: ${{ matrix.molecule_distro }}

molecule/os_hardening_vm/molecule.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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}"
2830
verifier:
2931
name: ansible
3032
env:

molecule/ssh_hardening_bsd/molecule.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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}"
2426
verifier:
2527
name: ansible
2628
env:

0 commit comments

Comments
 (0)