# 使用 Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper 安装 ansible-lint

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

## 安装

```sh
sudo av install brew:ansible-lint
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install ansible-lint
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install ansible-lint
```

  证据: MacPorts ports tree: sysutils/ansible-lint/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add ansible-lint
```

  证据: Alpine Linux edge package indexes: ansible-lint from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install ansible-lint
```

  证据: Debian stable package indexes: ansible-lint from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install python3-ansible-lint
```

  证据: Fedora Rawhide package metadata: python3-ansible-lint from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#ansible-lint
```

  证据: nixpkgs package indexes: pkgs/by-name/an/ansible-lint/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S ansible-lint
```

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

- zypper (92%):

```sh
sudo zypper install ansible-lint
```

  证据: openSUSE Tumbleweed package metadata: ansible-lint from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## 软件包事实

- **软件包键:** brew:ansible-lint
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/ansible-lint>
- **版本:** 26.6.0
- **来源摘要:** Checks ansible playbooks for practices and behaviour
- **主页:** <https://ansible-lint.readthedocs.io/>
- **仓库:** <https://github.com/ansible/ansible-lint>
- **上游文档:** <https://docs.ansible.com/projects/lint>
- **许可证:** MIT AND GPL-3.0-or-later
- **源码归档:** <https://files.pythonhosted.org/packages/4c/e5/547e64cf118392fb4d02c179eb0cd86b06145bf7c8e18ab49cc6de5e9886/ansible_lint-26.6.0.tar.gz>
- **最后更新:** 2026-07-01T15:27:34Z
- **已生成:** 2026-07-08T07:18:31+00:00

## 可执行文件

- ansible-lint (cli)
- ansible-lint (别名)

## 依赖

- cryptography
- libyaml
- python@3.14
- rpds-py

## 构建依赖

- pkgconf
- rust

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 26.6.0
- 管理器更新时间: 2026-07-01
- 本地数据: OK
- 上游仓库: https://ansible-lint.readthedocs.io/
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

Ansible-lint is the standard linting and policy-checking tool for Ansible playbooks, roles, and collections. It checks content for practices and behavior that can be improved and is now part of the Ansible developer-tooling workflow.

### 项目历史

The project lives under the ansible GitHub organization and its README describes it as a community-backed project that supports the last two major Ansible versions. Official documentation covers configuration files, profiles, rule behavior, usage, and CI integration.

Ansible-lint has gone through several packaging and versioning eras. The PyPI release history shows older 6.x releases, later 24.x calendar-style releases, and current 26.x releases. Maintainer discussions document the pain around historical versioning and the move toward a clearer release cadence.

### 采用历史

Ansible-lint became the default quality gate for Ansible content because it encodes conventions that are hard to remember during playbook authoring: rule profiles, syntax checks, risky module usage, task style, role/collection layout, and compatibility concerns.

Its adoption broadened when the repository added a GitHub Action workflow example and editor integrations began surfacing lint feedback through the Ansible VS Code extension and the Ansible Language Server. Red Hat documentation and blogs present it as a way to improve automation functionality, reliability, readability, and maintainability.

### 使用方式

Users normally run `ansible-lint` from the root of a project or collection. Configuration is loaded from `.ansible-lint`, `.ansible-lint.yml`, `.ansible-lint.yaml`, `.config/ansible-lint.yml`, or `.config/ansible-lint.yaml`, and scalar CLI options override configured values.

In CI, teams commonly use ansible-lint as a pull-request gate or GitHub Action. Locally, it is also part of editor feedback loops through VS Code and LSP clients, often paired with ansible-core, yamllint, and collection dependency installation.

### 为什么软件包爱好者会关心

For package managers, ansible-lint is one of the important Ansible leaf tools: it is not the runtime automation engine, but many repositories treat it as mandatory infrastructure for accepting changes. That makes version pinning and compatibility with ansible-core unusually visible.

It also exposes the tension in Ansible packaging after the split between the Ansible community package, ansible-core, and collections. A linter must understand all of those moving parts while still being installable as one CLI.

### 时间线

- 2020: ansible-lint 5.0 upgrade guidance begins documenting changed installation and dependency expectations.
- 2021: Maintainer discussion calls out versioning pain in the project.
- 2022: Ansible-lint v6.0.0 starts a release line that later grows large enough to motivate calendar-style versioning.
- 2024: PyPI shows 24.x calendar-style ansible-lint releases.
- 2026: GitHub releases and Homebrew package 26.x ansible-lint.

### Related projects

- ansible-core supplies the execution and syntax behavior that ansible-lint must track.
- ansible-dev-tools bundles ansible-lint with other authoring tools.
- Ansible Language Server and the VS Code extension surface ansible-lint diagnostics in editors.
- yamllint is commonly paired with ansible-lint for YAML-level checks.

### 来源

- <https://docs.ansible.com/projects/lint/configuring/>
- <https://docs.ansible.com/projects/lint/usage/>
- <https://github.com/ansible/ansible-lint>
- <https://github.com/ansible/ansible-lint/discussions/1626>
- <https://pypi.org/project/ansible-lint/>
- <https://www.redhat.com/en/blog/ansible-lint>


## 安全说明

没有找到 ansible-lint 的匹配本地密钥处理 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: .ansible-lint, .ansible-lint.yml, .ansible-lint.yaml, .config/ansible-lint.yml, .config/ansible-lint.yaml
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** ansible-lint
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## 其他软件包管理器记录

- Debian apt - ansible-lint - 25.6.1+really25.2.1-1: normalized package name match | Debian stable package indexes: ansible-lint from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | lint tool for Ansible playbooks | https://github.com/ansible-community/ansible-lint
- Nix - ansible-lint: normalized package name match | nixpkgs package indexes: pkgs/by-name/an/ansible-lint/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - ansible-lint - 6.17.2-1: normalized package name match | Ubuntu 24.04 LTS package indexes: ansible-lint from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | lint tool for Ansible playbooks | https://github.com/ansible-community/ansible-lint
- apk - ansible-lint - 26.4.0-r0: normalized package name match | Alpine Linux edge package indexes: ansible-lint from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | check ansible playbooks | https://github.com/ansible/ansible-lint
- apk - ansible-lint-pyc - 26.4.0-r0: normalized package name match | Alpine Linux edge package indexes: ansible-lint-pyc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Precompiled Python bytecode for ansible-lint | https://github.com/ansible/ansible-lint
- dnf - python3-ansible-lint - 26.4.0-3.fc45: normalized package name match | Fedora Rawhide package metadata: python3-ansible-lint from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Best practices checker for Ansible | https://github.com/ansible/ansible-lint
- pacman - ansible-lint - 26.4.0-1: normalized package name match | Arch Linux sync databases: ansible-lint from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Checks playbooks for practices and behaviour that could potentially be improved. | https://github.com/ansible/ansible-lint
- zypper - ansible-lint - 26.4.0-2.1: normalized package name match | openSUSE Tumbleweed package metadata: ansible-lint from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Best practices checker for Ansible | https://github.com/ansible/ansible-lint
- MacPorts - ansible-lint: normalized package name match | MacPorts ports tree: sysutils/ansible-lint/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 相关链接

- [Cloud CLI packages](https://www.automicvault.com/zh-hans/pkg/cloud-clis/) - Belongs to a cloud or infrastructure command family.
- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Developer build packages](https://www.automicvault.com/zh-hans/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/zh-hans/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [python@3.14](https://www.automicvault.com/zh-hans/pkg/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [pkgconf](https://www.automicvault.com/zh-hans/pkg/brew/pkgconf/) - Build dependency declared by Homebrew.
- [rust](https://www.automicvault.com/zh-hans/pkg/brew/rust/) - Build dependency declared by Homebrew.
- [ansible-cmdb](https://www.automicvault.com/zh-hans/pkg/brew/ansible-cmdb/) - Shares av.db curated category or tags: ansible, cli, cloud-infrastructure, configuration-management.
- [ansible-creator](https://www.automicvault.com/zh-hans/pkg/brew/ansible-creator/) - Shares av.db curated category or tags: ansible, cli, cloud-infrastructure, configuration-management.
- [ansible](https://www.automicvault.com/zh-hans/pkg/brew/ansible/) - Shares av.db curated category or tags: cli, cloud-infrastructure, configuration-management.
- [kubecfg](https://www.automicvault.com/zh-hans/pkg/brew/kubecfg/) - Shares av.db curated category or tags: cli, cloud-infrastructure, configuration-management.
- [talm](https://www.automicvault.com/zh-hans/pkg/brew/talm/) - Shares av.db curated category or tags: cli, cloud-infrastructure, configuration-management.
- [tanka](https://www.automicvault.com/zh-hans/pkg/brew/tanka/) - Shares av.db curated category or tags: cli, cloud-infrastructure, configuration-management.
- [ansible-builder](https://www.automicvault.com/zh-hans/pkg/brew/ansible-builder/) - Shares av.db curated category or tags: ansible, cli, cloud-infrastructure.
- [actions-batch](https://www.automicvault.com/zh-hans/pkg/brew/actions-batch/) - Shares av.db curated category or tags: cli, cloud-infrastructure.

## Combined YAML source

View the package source record on GitHub. [combined/ansible-lint.yml](https://github.com/automic-vault/db/blob/main/combined/ansible-lint.yml)


## 来源

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
