Stats
Actions
Tags
From cogni-ai-dev-ops
How to run and manage Molecule tests for Ansible roles and playbooks. You MUST load this skill when running or managing Molecule tests for Ansible.
How this skill is triggered — by the user, by Claude, or both
Slash command
/cogni-ai-dev-ops:moleculeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
<!-- markdownlint-disable MD013 MD023 MD031 MD032 -->
# Run Molecule tests
molecule test
# Syntax check
molecule syntax
When running Molecule inside GitHub Codespaces or a repository's VS Code devcontainer:
.venv or venv; use the existing container Python
environment, which should already provide the required dependencies..devcontainer/requirements.txt or
.devcontainer/devcontainer.json instead of introducing a per-run Molecule install step or a separate virtual
environment.If you encounter problems or hangs during molecule test:
molecule create, molecule converge, molecule destroy)
to isolate the issue.timeout 600s molecule create for a max of 5-10 minutes).ANSIBLE_ALLOW_BROKEN_CONDITIONALS=1 environment variable
(e.g., timeout 600s env ANSIBLE_ALLOW_BROKEN_CONDITIONALS=1 molecule create).requests or docker is installed for the main container
Python but Ansible still cannot import it, check ansible --version to identify the interpreter in use. In
Codespaces/devcontainers, Ansible may run from a pipx-managed environment, so install controller-side libraries there as
well, for example with pipx inject ansible -r .devcontainer/requirements-ansible.txt.npx claudepluginhub cogni-ai-ou/cogni-ai-agentic-collections --plugin cogni-ai-dev-opsGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.