# 使用 Homebrew, Nix, pacman, zypper 安装 molecule

查看 molecule 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:molecule
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install molecule
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#molecule
```

  证据: nixpkgs package indexes: molecule from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

- pacman (92%):

```sh
sudo pacman -S molecule
```

  证据: Arch Linux sync databases: molecule from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install molecule
```

  证据: openSUSE Tumbleweed package metadata: molecule from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## 软件包事实

- **软件包键:** brew:molecule
- **软件包管理器:** Homebrew
- **版本:** 26.6.0
- **来源摘要:** Automated testing for Ansible roles
- **主页:** <https://molecule.readthedocs.io>
- **最后更新:** 2026-07-15T12:24:47Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- molecule (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 26.6.0
## 项目历史与用法

Molecule is an Ansible testing framework for developing and testing Ansible collections, playbooks, and roles. The Ansible project README credits Retr0h as the creator and describes the project as community-maintained as part of Ansible by Red Hat. Its official documentation presents Molecule as a framework that uses standard Ansible concepts such as inventory, playbooks, and collections to test systems reachable through containers, virtual machines, cloud infrastructure, APIs, databases, network devices, and other targets.

### 项目历史

The major adoption turning point came in 2018, when Ansible announced that it would adopt molecule and ansible-lint as official Red Hat Ansible projects. The announcement said the tools were community-built and important to Ansible automation development, thanked Cisco and John Dewey for work on Molecule, and described migration of the repositories to the ansible GitHub organization while keeping the PyPI package name molecule. That move gave Molecule a formal place in the Ansible toolchain rather than leaving it as a separate community utility.

### 采用历史

In practice, Molecule gives role and collection authors a repeatable local and CI workflow: initialize a scenario, create or converge test instances, run Ansible content, then verify behavior through Ansible-native checks or external verifiers. The docs show CI use with GitHub Actions, Travis CI, GitLab CI, Azure Pipelines, and molecule test. Community adoption is visible in Ansible role maintainers replacing homegrown Docker-based test rigs with Molecule-based tests after the Red Hat adoption announcement.

### 使用方式

The project broadened from role-only testing toward playbooks and collections. Red Hat's 2023 Molecule 6 developer-preview article framed Molecule as part of the Ansible Automation Platform developer experience and emphasized functional testing for Ansible content, including collection-level testing and making the Testinfra verifier optional in favor of Ansible-native validation.

### 来源

- <https://developers.redhat.com/articles/2023/09/13/introducing-ansible-molecule-ansible-automation-platform>
- <https://docs.ansible.com/projects/molecule/>
- <https://docs.ansible.com/projects/molecule/ci/>
- <https://forum.ansible.com/t/ansible-to-adopt-molecule-and-ansible-lint-projects/28657>
- <https://github.com/ansible/molecule/>
- <https://www.jeffgeerling.com/blog/2018/testing-your-ansible-roles-molecule/>


## 安全说明

没有找到 molecule 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ~/.config/molecule/config.yml, ./config.yml, extensions/molecule/config.yml, molecule.yml
## 其他软件包管理器记录

- Nix - molecule: normalized package name match | nixpkgs package indexes: molecule from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- pacman - molecule - 26.6.0-1: normalized package name match | Arch Linux sync databases: molecule from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Aids in the development and testing of Ansible roles | https://github.com/ansible-community/molecule
- zypper - molecule - 26.6.0-1.2: normalized package name match | openSUSE Tumbleweed package metadata: molecule from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Aids in the development and testing of Ansible roles | https://github.com/ansible-community/molecule


## Combined YAML source

View the package source record on GitHub. [combined/molecule.yml](https://github.com/mxcl/pkgdb/blob/main/combined/molecule.yml)


## 来源

- pkg.so package database
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
