Molecule Docker is a driver plugin for Molecule, the Ansible role testing framework. It allows users to test their Ansible roles against Docker containers, providing a lightweight and isolated environment for development and testing. The current version is 2.1.0, and it follows Molecule's release cadence, with major releases aligning with Molecule's major versions and frequent bugfix/minor updates.
pip install molecule-dockerNo compatibility data collected yet for this library.
To quickly get started, create a `molecule/default/molecule.yml` file and a `molecule/default/converge.yml` file as shown. This configuration specifies the `docker` driver, uses a `pycontribs/centos:8` image, and runs a basic Ansible ping task. After saving these, navigate to the `molecule/default` directory and run `molecule test`.
Upgrade Molecule to 4.x, Ansible Core to 2.12.x+, and use Python 3.8+.
Install the collection using `ansible-galaxy collection install community.docker` and ensure it meets the minimum version requirement.
Upgrade to a newer stable release like 1.0.1 or 2.1.0, or pin to an older stable version if necessary.
Upgrade to `molecule-docker` 1.0.1 or newer and install `community.docker`.
Upgrade Molecule: `pip install --upgrade molecule`.
Upgrade ansible-core: `pip install --upgrade ansible-core`.
Install the collection: `ansible-galaxy collection install community.docker`.
Ensure Docker is running and has internet access. Manually pull the image with `docker pull docker.io/pycontribs/centos:8` to diagnose network issues, or correct the image name in `molecule.yml`.