Molecule Vagrant is a plugin for the Molecule testing framework, enabling users to provision and test Ansible roles and playbooks on Vagrant-managed virtual machines. It integrates the robust local virtualization capabilities of Vagrant with Molecule's structured testing approach. The current version is 2.0.0, with releases typically aligning with major Molecule updates or significant breaking changes.
pip install molecule-vagrantVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize a Molecule scenario with the Vagrant driver, configure a basic Vagrant box in `molecule.yml`, and execute the Molecule test sequence. Remember that Vagrant and a provider must be installed separately on your system.
Upgrade your Python environment to 3.9 or newer before installing molecule-vagrant 2.0.0+.
Ensure `ansible` is installed in your Python environment explicitly (e.g., `pip install ansible`) before running Molecule tests.
Install Vagrant (https://www.vagrantup.com/downloads) and your chosen virtualization provider (e.g., VirtualBox https://www.virtualbox.org/wiki/Downloads) separately.
Consult the `pyproject.toml` or `setup.cfg` of your `molecule-vagrant` version for the exact `molecule` dependency range and ensure you install a compatible `molecule` version.