MCPcopy
hub / github.com/ansible/molecule

github.com/ansible/molecule @v26.6.0 sqlite

repository ↗ · DeepWiki ↗ · release v26.6.0 ↗
1,536 symbols 4,812 edges 160 files 971 documented · 63%
README

About Ansible Molecule

PyPI Package Documentation Status image Python Black Code Style Ansible Code of Conduct Discussions Repository License

Molecule is an Ansible testing framework designed for developing and testing Ansible collections, playbooks, and roles.

Molecule leverages standard Ansible features including inventory, playbooks, and collections to provide flexible testing workflows. Test scenarios can target any system or service reachable from Ansible, from containers and virtual machines to cloud infrastructure, hyperscaler services, APIs, databases, and network devices. Molecule can also validate inventory configurations and dynamic inventory sources.

Molecule encourages an approach that results in consistently developed Ansible content that is well-written, easily understood and maintained.

Molecule supports only the latest two major versions of Ansible (N/N-1).

Once installed, the command line can be called using any of the methods below:

molecule ...
python3 -m molecule ...  # python module calling method

Documentation

Read the documentation and more at https://docs.ansible.com/projects/molecule//.

Get Involved

See the Talk to us section of the documentation to ask questions, find help, and join the conversation.

For complete details, see the Ansible communication guide.

If you want to get moving fast and make a quick patch:

git clone https://github.com/ansible-community/molecule && cd molecule
python3 -m venv .venv && source .venv/bin/activate
python3 -m pip install -U setuptools pip tox

And you're ready to make your changes!

Authors

Molecule project was created by Retr0h and it is now community-maintained as part of the Ansible by Red Hat project.

License

The MIT License.

The logo is licensed under the Creative Commons NoDerivatives 4.0 License.

If you have some other use in mind, contact us.

Core symbols most depended-on inside this repo

append
called by 137
src/molecule/reporting/definitions.py
_generate_help_text
called by 34
src/molecule/click_cfg.py
add_completion
called by 34
src/molecule/reporting/definitions.py
add_action_result
called by 29
src/molecule/reporting/definitions.py
getvalue
called by 24
src/molecule/ansi_output.py
interpolate
called by 22
src/molecule/interpolation.py
write
called by 22
src/molecule/ansi_output.py
change_state
called by 20
src/molecule/state.py

Shape

Function 1,030
Method 383
Class 103
Route 20

Languages

Python100%

Modules by API surface

tests/unit/test_click_cfg.py65 symbols
tests/unit/provisioner/test_ansible.py58 symbols
tests/unit/test_reporting.py56 symbols
tests/unit/test_util.py55 symbols
tests/unit/test_config.py51 symbols
tests/unit/command/test_base.py44 symbols
src/molecule/provisioner/ansible.py44 symbols
src/molecule/config.py42 symbols
src/molecule/click_cfg.py39 symbols
tests/unit/command/test_reset.py33 symbols
src/molecule/util.py33 symbols
src/molecule/ansi_output.py32 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

Dependencies from manifests, versioned

ansible-compat25.1.4 · 1×
ansible-core2.15.0 · 1×
enrich1.2.7 · 1×
jinja22.11.3 · 1×
jsonschema4.9.1 · 1×
packaging23.2 · 1×
pyyaml5.1 · 1×
rich9.5.1 · 1×
wcmatch8.1.2 · 1×

For agents

$ claude mcp add molecule \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact