{"library":"molecule-docker","title":"Molecule Docker Driver","description":"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.","language":"python","status":"active","last_verified":"Thu Apr 16","install":{"commands":["pip install molecule-docker"],"cli":null},"imports":[],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"# molecule/default/molecule.yml\n---\ndependency:\n  name: galaxy\ndriver:\n  name: docker\nplatforms:\n  - name: instance\n    image: \"docker.io/pycontribs/centos:8\"\n    pre_build_image: true\nprovisioner:\n  name: ansible\n  playbooks:\n    converge: converge.yml\nverifier:\n  name: ansible\n\n# molecule/default/converge.yml\n---\n- name: Converge\n  hosts: instance\n  tasks:\n    - name: \"Check ping\"\n      ansible.builtin.ping\n","lang":"yaml","description":"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`.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}